qio: non-default context for threaded qtask
commita17536c594bfed94d05667b419f747b692f5fc7f
authorPeter Xu <peterx@redhat.com>
Mon, 5 Mar 2018 06:43:22 +0000 (5 14:43 +0800)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 6 Mar 2018 10:19:05 +0000 (6 10:19 +0000)
tree6e623ad270bb97e1eae6685e32d80e110b55247a
parent938c8b79e5249d41469151e30268cfaf88bdb588
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>
include/io/task.h
io/channel-socket.c
io/dns-resolver.c
io/task.c
tests/test-io-task.c