diff options
Diffstat (limited to 'util/thread-pool.c')
-rw-r--r-- | util/thread-pool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/thread-pool.c b/util/thread-pool.c index 7c9cec57e3..ce6cd30193 100644 --- a/util/thread-pool.c +++ b/util/thread-pool.c @@ -185,7 +185,9 @@ restart: */ qemu_bh_schedule(pool->completion_bh); + aio_context_release(pool->ctx); elem->common.cb(elem->common.opaque, elem->ret); + aio_context_acquire(pool->ctx); qemu_aio_unref(elem); goto restart; } else { @@ -269,7 +271,7 @@ static void thread_pool_co_cb(void *opaque, int ret) ThreadPoolCo *co = opaque; co->ret = ret; - qemu_coroutine_enter(co->co); + aio_co_wake(co->co); } int coroutine_fn thread_pool_submit_co(ThreadPool *pool, ThreadPoolFunc *func, |