On 27 June 2012 10:10, Andreas Färber <afaer...@suse.de> wrote: > Maybe I'm misunderstanding the discussion, but there's three coroutine > implementations, including one based on GThread. So in that case any > coroutine can be preempted anywhere and there are no such guarantees as > discussed here, are there?
No, because the gthread-based implementation carefully ensures that it's only actually allowing one thread to execute at once: qemu_coroutine_switch() will make the calling thread block until some other coroutine switches back to it. Any failure to enforce the coroutine yield semantics would be a bug (and an indication of why having three separate backends is a bad idea :-)) -- PMM