mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qio: non-default context for async conn
We have worked on qio_task_run_in_thread() already. Further, let all the qio channel APIs use that context. Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
a17536c594
commit
8005fdd8fa
5 changed files with 27 additions and 14 deletions
|
@ -174,7 +174,8 @@ void qio_channel_socket_connect_async(QIOChannelSocket *ioc,
|
|||
SocketAddress *addr,
|
||||
QIOTaskFunc callback,
|
||||
gpointer opaque,
|
||||
GDestroyNotify destroy)
|
||||
GDestroyNotify destroy,
|
||||
GMainContext *context)
|
||||
{
|
||||
QIOTask *task = qio_task_new(
|
||||
OBJECT(ioc), callback, opaque, destroy);
|
||||
|
@ -189,7 +190,7 @@ void qio_channel_socket_connect_async(QIOChannelSocket *ioc,
|
|||
qio_channel_socket_connect_worker,
|
||||
addrCopy,
|
||||
(GDestroyNotify)qapi_free_SocketAddress,
|
||||
NULL);
|
||||
context);
|
||||
}
|
||||
|
||||
|
||||
|
@ -234,7 +235,8 @@ void qio_channel_socket_listen_async(QIOChannelSocket *ioc,
|
|||
SocketAddress *addr,
|
||||
QIOTaskFunc callback,
|
||||
gpointer opaque,
|
||||
GDestroyNotify destroy)
|
||||
GDestroyNotify destroy,
|
||||
GMainContext *context)
|
||||
{
|
||||
QIOTask *task = qio_task_new(
|
||||
OBJECT(ioc), callback, opaque, destroy);
|
||||
|
@ -248,7 +250,7 @@ void qio_channel_socket_listen_async(QIOChannelSocket *ioc,
|
|||
qio_channel_socket_listen_worker,
|
||||
addrCopy,
|
||||
(GDestroyNotify)qapi_free_SocketAddress,
|
||||
NULL);
|
||||
context);
|
||||
}
|
||||
|
||||
|
||||
|
@ -310,7 +312,8 @@ void qio_channel_socket_dgram_async(QIOChannelSocket *ioc,
|
|||
SocketAddress *remoteAddr,
|
||||
QIOTaskFunc callback,
|
||||
gpointer opaque,
|
||||
GDestroyNotify destroy)
|
||||
GDestroyNotify destroy,
|
||||
GMainContext *context)
|
||||
{
|
||||
QIOTask *task = qio_task_new(
|
||||
OBJECT(ioc), callback, opaque, destroy);
|
||||
|
@ -325,7 +328,7 @@ void qio_channel_socket_dgram_async(QIOChannelSocket *ioc,
|
|||
qio_channel_socket_dgram_worker,
|
||||
data,
|
||||
qio_channel_socket_dgram_worker_free,
|
||||
NULL);
|
||||
context);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue