]> Git Repo - qemu.git/commit
io: Yield rather than wait when already in coroutine
authorEric Blake <[email protected]>
Tue, 5 Sep 2017 19:11:12 +0000 (14:11 -0500)
committerEric Blake <[email protected]>
Wed, 6 Sep 2017 15:10:58 +0000 (10:10 -0500)
commit9ffb8270205a274a18ee4f8a735e2fccaf957246
tree6ec3d166399cf431b720d44cf53489cce3187047
parent3f5c4076f118072ac7403ca092d63a1766cd5e04
io: Yield rather than wait when already in coroutine

The new qio_channel_{read,write}{,v}_all functions are documented
as yielding until data is available.  When used on a blocking
channel, this yield is done via qio_channel_wait() which spawns
a nested event loop under the hood (so it is that secondary loop
which yields as needed); but if we are already in a coroutine (at
which point QIO_CHANNEL_ERR_BLOCK is only possible if we are a
non-blocking channel), we want to yield the current coroutine
instead of spawning a nested event loop.

Signed-off-by: Eric Blake <[email protected]>
Message-Id: <20170905191114[email protected]>
Acked-by: Daniel P. Berrange <[email protected]>
[commit message updated]
Signed-off-by: Eric Blake <[email protected]>
io/channel.c
This page took 0.02398 seconds and 4 git commands to generate.