Re: [PATCH v4 3/3] thread-pool: use ThreadPool from the running thread

2022-10-31 Thread Stefan Hajnoczi
On Mon, Oct 31, 2022 at 08:59:36AM -0400, Emanuele Giuseppe Esposito wrote: > @@ -251,6 +247,9 @@ BlockAIOCB *thread_pool_submit_aio(ThreadPool *pool, Documentation must be added to explain that thread_pool_submit_aio(), thread_pool_submit_co(), and thread_pool_submit() must be called on the threa

[PATCH v4 3/3] thread-pool: use ThreadPool from the running thread

2022-10-31 Thread Emanuele Giuseppe Esposito
Use qemu_get_current_aio_context() where possible, since we always submit work to the current thread anyways. We want to also be sure that the thread submitting the work is the same as the one processing the pool, to avoid adding synchronization to the pool list. Signed-off-by: Paolo Bonzini Sig