Re: [Qemu-devel] [PATCH 2/2] aio: add aio_context_acquire() and aio_context_release()

2013-10-11 Thread Wenchao Xia
Reviewed-by: Wenchao Xia

[Qemu-devel] [PATCH 2/2] aio: add aio_context_acquire() and aio_context_release()

2013-10-09 Thread Stefan Hajnoczi
It can be useful to run an AioContext from a thread which normally does not "own" the AioContext. For example, request draining can be implemented by acquiring the AioContext and looping aio_poll() until all requests have been completed. The following pattern should work: /* Event loop thread