]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
client rpc: Use event loop for writing
authorJiri Denemark <jdenemar@redhat.com>
Tue, 12 Jun 2012 06:41:59 +0000 (08:41 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 13 Jun 2012 13:32:29 +0000 (15:32 +0200)
commit9e747e5c5079a5aead2f248fc22ff658bd0180be
tree1cd7310d6a2bff14a594789e7dc89c1c21714011
parent71689f95ceedbc63953a0b06aa2c2cee7fabfa2b
client rpc: Use event loop for writing

Normally, when every call has a thread associated with it, the thread
may get the buck and be in charge of sending all calls until its own
call is done. When we introduced non-blocking calls, we had to add
special handling of new non-blocking calls. This patch uses event loop
to send data if there is no thread to get the buck so that any
non-blocking calls left in the queue are properly sent without having to
handle them specially. It also avoids adding even more cruft to client
IO loop in the following patches.

With this change in, non-blocking calls may see unpredictable delays in
delivery when the client has no event loop registered. However, the only
non-blocking calls we have are keepalives and we already require event
loop for them, which makes this a non-issue until someone introduces new
non-blocking calls.
src/rpc/virnetclient.c