mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
qio: non-default context for threaded qtask
qio_task_run_in_thread() allows main thread to run blocking operations in the background. However it has an assumption on that it's always working with the default context. This patch tries to allow the threaded QIO task framework to run with non-default gcontext. Currently no functional change so far, so the QIOTasks are still always running on main context. Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
committed by
Daniel P. Berrangé
parent
938c8b79e5
commit
a17536c594
@ -188,7 +188,8 @@ void qio_channel_socket_connect_async(QIOChannelSocket *ioc,
|
||||
qio_task_run_in_thread(task,
|
||||
qio_channel_socket_connect_worker,
|
||||
addrCopy,
|
||||
(GDestroyNotify)qapi_free_SocketAddress);
|
||||
(GDestroyNotify)qapi_free_SocketAddress,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -246,7 +247,8 @@ void qio_channel_socket_listen_async(QIOChannelSocket *ioc,
|
||||
qio_task_run_in_thread(task,
|
||||
qio_channel_socket_listen_worker,
|
||||
addrCopy,
|
||||
(GDestroyNotify)qapi_free_SocketAddress);
|
||||
(GDestroyNotify)qapi_free_SocketAddress,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -322,7 +324,8 @@ void qio_channel_socket_dgram_async(QIOChannelSocket *ioc,
|
||||
qio_task_run_in_thread(task,
|
||||
qio_channel_socket_dgram_worker,
|
||||
data,
|
||||
qio_channel_socket_dgram_worker_free);
|
||||
qio_channel_socket_dgram_worker_free,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user