diff options
author | Peter Xu <peterx@redhat.com> | 2018-03-05 14:43:22 +0800 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2018-03-06 10:19:05 +0000 |
commit | a17536c594bfed94d05667b419f747b692f5fc7f (patch) | |
tree | 6e623ad270bb97e1eae6685e32d80e110b55247a /io/dns-resolver.c | |
parent | 938c8b79e5249d41469151e30268cfaf88bdb588 (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 'io/dns-resolver.c')
-rw-r--r-- | io/dns-resolver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/io/dns-resolver.c b/io/dns-resolver.c index 8c924071c4..187f725665 100644 --- a/io/dns-resolver.c +++ b/io/dns-resolver.c @@ -234,7 +234,8 @@ void qio_dns_resolver_lookup_async(QIODNSResolver *resolver, qio_task_run_in_thread(task, qio_dns_resolver_lookup_worker, data, - qio_dns_resolver_lookup_data_free); + qio_dns_resolver_lookup_data_free, + NULL); } |