summary refs log tree commit diff stats
path: root/include/io/task.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-03-08 11:26:13 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-03-08 11:26:14 +0000
commit3ef91576b96de7051dacc2132cddfb486b46e863 (patch)
tree8ae5b6109272dfc7ae177cb086b2afaaac7bd12b /include/io/task.h
parent854a4436dd313eaeb51c275d00526d60437915d2 (diff)
parent1939ccdaa61ce6a1f57d83277b3d41d3a9ad3c58 (diff)
downloadfocaccia-qemu-3ef91576b96de7051dacc2132cddfb486b46e863.tar.gz
focaccia-qemu-3ef91576b96de7051dacc2132cddfb486b46e863.zip
Merge remote-tracking branch 'remotes/berrange/tags/qio-next-pull-request' into staging
# gpg: Signature made Wed 07 Mar 2018 11:24:41 GMT
# gpg:                using RSA key BE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>"
# gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>"
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* remotes/berrange/tags/qio-next-pull-request:
  qio: non-default context for TLS handshake
  qio: non-default context for async conn
  qio: non-default context for threaded qtask
  qio: store gsources for net listeners
  qio: introduce qio_channel_add_watch_{full|source}
  qio: rename qio_task_thread_result

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/io/task.h')
-rw-r--r--include/io/task.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/io/task.h b/include/io/task.h
index 6021f51336..9e09b95b2e 100644
--- a/include/io/task.h
+++ b/include/io/task.h
@@ -227,15 +227,18 @@ QIOTask *qio_task_new(Object *source,
  * @worker: the function to invoke in a thread
  * @opaque: opaque data to pass to @worker
  * @destroy: function to free @opaque
+ * @context: the context to run the complete hook. If %NULL, the
+ *           default context will be used.
  *
  * Run a task in a background thread. When @worker
  * returns it will call qio_task_complete() in
- * the main event thread context.
+ * the event thread context that provided.
  */
 void qio_task_run_in_thread(QIOTask *task,
                             QIOTaskWorker worker,
                             gpointer opaque,
-                            GDestroyNotify destroy);
+                            GDestroyNotify destroy,
+                            GMainContext *context);
 
 /**
  * qio_task_complete: