mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13: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
|
@ -101,6 +101,8 @@ int qio_channel_socket_connect_sync(QIOChannelSocket *ioc,
|
|||
* @callback: the function to invoke on completion
|
||||
* @opaque: user data to pass to @callback
|
||||
* @destroy: the function to free @opaque
|
||||
* @context: the context to run the async task. If %NULL, the default
|
||||
* context will be used.
|
||||
*
|
||||
* Attempt to connect to the address @addr. This method
|
||||
* will run in the background so the caller will regain
|
||||
|
@ -113,7 +115,8 @@ void qio_channel_socket_connect_async(QIOChannelSocket *ioc,
|
|||
SocketAddress *addr,
|
||||
QIOTaskFunc callback,
|
||||
gpointer opaque,
|
||||
GDestroyNotify destroy);
|
||||
GDestroyNotify destroy,
|
||||
GMainContext *context);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -138,6 +141,8 @@ int qio_channel_socket_listen_sync(QIOChannelSocket *ioc,
|
|||
* @callback: the function to invoke on completion
|
||||
* @opaque: user data to pass to @callback
|
||||
* @destroy: the function to free @opaque
|
||||
* @context: the context to run the async task. If %NULL, the default
|
||||
* context will be used.
|
||||
*
|
||||
* Attempt to listen to the address @addr. This method
|
||||
* will run in the background so the caller will regain
|
||||
|
@ -150,7 +155,8 @@ void qio_channel_socket_listen_async(QIOChannelSocket *ioc,
|
|||
SocketAddress *addr,
|
||||
QIOTaskFunc callback,
|
||||
gpointer opaque,
|
||||
GDestroyNotify destroy);
|
||||
GDestroyNotify destroy,
|
||||
GMainContext *context);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -179,6 +185,8 @@ int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc,
|
|||
* @callback: the function to invoke on completion
|
||||
* @opaque: user data to pass to @callback
|
||||
* @destroy: the function to free @opaque
|
||||
* @context: the context to run the async task. If %NULL, the default
|
||||
* context will be used.
|
||||
*
|
||||
* Attempt to initialize a datagram socket bound to
|
||||
* @localAddr and communicating with peer @remoteAddr.
|
||||
|
@ -194,7 +202,8 @@ void qio_channel_socket_dgram_async(QIOChannelSocket *ioc,
|
|||
SocketAddress *remoteAddr,
|
||||
QIOTaskFunc callback,
|
||||
gpointer opaque,
|
||||
GDestroyNotify destroy);
|
||||
GDestroyNotify destroy,
|
||||
GMainContext *context);
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue