I was looking at block jobs' AioContext and realized that the block job
coroutines are actually started in main loop.

I'm confused because 5a7e7a0bad17c96e03f55ed7019e2d7545e21a96 and friends in
the series [1] seem to move the coroutines to the BDS's iothreads, but it
didn't do that.

(Although after the first block_job_yield or sleep, the coroutines ARE resumed
in the right AioContext.)

Why is it safe to start the jobs from the main thread where QMP command is
handled? I see no guarantee that the jobs won't access BDS before first yield
but after releasing the AioContext.

Is this a bug?

[1]: http://lists.gnu.org/archive/html/qemu-devel/2014-10/msg02191.html

Thanks,
Fam

Reply via email to