Re: [PATCH v4 3/9] add target method delegation

Tom Tromey
2013-12-11T22:03:00Z

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> So to take that example, if we made dummy_target.to_wait be the
Pedro> current to_wait default, which is to call noprocess(), then
Pedro> it'd be clear that target_delegate_wait shouldn't ever go past
Pedro> the loop, and then it'd be clear that an assertion is appropriate.

Pedro> target_wait would then be:
[...]
Pedro> WDYT?

It seems good to me.

I'll make a patch to normalize the delegation across all the target
methods. Too bad for me I already touched all these methods on the
multi-target branch -- ouch.

Testing revealed that we can't put the assert into
target_delegate_async. This is a funny one. The dummy target has:

dummy_target.to_can_async_p = find_default_can_async_p;

... but this means that it is possible for to_can_async_p to return true
while the target does not actually implement to_async.

Tom