aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2018-03-05 14:43:22 +0800
committerDaniel P. Berrangé <berrange@redhat.com>2018-03-06 10:19:05 +0000
commita17536c594bfed94d05667b419f747b692f5fc7f (patch)
tree6e623ad270bb97e1eae6685e32d80e110b55247a /tests
parent938c8b79e5249d41469151e30268cfaf88bdb588 (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-io-task.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test-io-task.c b/tests/test-io-task.c
index 141aa2c55d..bac1bb4e7a 100644
--- a/tests/test-io-task.c
+++ b/tests/test-io-task.c
@@ -187,6 +187,7 @@ static void test_task_thread_complete(void)
qio_task_run_in_thread(task,
test_task_thread_worker,
&data,
+ NULL,
NULL);
g_main_loop_run(data.loop);
@@ -228,6 +229,7 @@ static void test_task_thread_failure(void)
qio_task_run_in_thread(task,
test_task_thread_worker,
&data,
+ NULL,
NULL);
g_main_loop_run(data.loop);