xemu/io
Daniel P. Berrangé dbb44504c2 io: add qio_task_wait_thread to join with a background thread
Add the ability for a caller to wait for completion of the
background thread to synchronously dispatch its result, without
needing to wait for the main loop to run the idle callback.

This method needs very careful usage to avoid a dangerous
race condition with the free'ing of the task. The completion
callback is normally invoked from an idle callback registered
with the main loop context. The qio_task_wait_thread method
must only be called if the completion callback has not yet
run. The only safe way to achieve this is to run the
qio_task_wait_thread method from the thread that executes
the main loop.

It is generally a bad idea to use this method since it will
block execution of the main loop, however, the design of
the character devices and its usage from vhostuser already
requires blocking execution.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20190211182442.8542-3-berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-02-12 17:35:56 +01:00
..
channel-buffer.c
channel-command.c io/channel-command: Do not kill the child process after closing the pipe 2018-02-15 16:54:57 +00:00
channel-file.c io: Add /dev/fdset/ support to QIOChannelFile 2018-02-15 16:54:57 +00:00
channel-socket.c io: ensure UNIX client doesn't unlink server socket 2019-01-24 12:23:35 +00:00
channel-tls.c io: return 0 for EOF in TLS session read after shutdown 2018-11-19 11:16:46 -06:00
channel-util.c sockets: move fd_is_socket() into common sockets code 2018-03-13 18:06:06 +00:00
channel-watch.c
channel-websock.c websock: fix handshake leak 2018-11-01 12:12:09 +04:00
channel.c qio: introduce qio_channel_add_watch_{full|source} 2018-03-06 10:19:04 +00:00
dns-resolver.c qio: non-default context for threaded qtask 2018-03-06 10:19:05 +00:00
Makefile.objs io: introduce a network socket listener API 2017-12-15 15:07:26 +00:00
net-listener.c Remove unnecessary variables for function return value 2018-05-20 08:48:13 +03:00
task.c io: add qio_task_wait_thread to join with a background thread 2019-02-12 17:35:56 +01:00
trace-events io: add qio_task_wait_thread to join with a background thread 2019-02-12 17:35:56 +01:00