[Spice-devel] [PATCH spice-streaming-agent v3 0/5] Add a SpiceStream class for stream access
Christophe de Dinechin
christophe at dinechin.org
Fri Nov 10 13:38:50 UTC 2017
From: Christophe de Dinechin <dinechin at redhat.com>
Add a SpiceStream that owns the actual stream.
This has several benefits:
1. It makes it possible to use proper RAII to deal
with the lifetime of the stream file descriptor
2. It opens the door for dealing with multiple streams
3. It removes one global with associated race conditions
A pre-existing race conditions when creating the thread
that processes cursor data is eliminated as a side effect.
Changes in v2:
* Change SpiceStream to a class
* A couple of int->bool adjustments
* Made write_all private and use streamfd
* Remove test for streamfd<0 in dtor
Christophe de Dinechin (5):
style: Remove useless whitespace
style: Use C++ style for declaring structs
Switch 'blocking' flag to bool
Use RAII to cleanup stream in case of exception or return
Move all stream-related functions within SpiceStream class
src/spice-streaming-agent.cpp | 111 +++++++++++++++++++++++++-----------------
1 file changed, 65 insertions(+), 46 deletions(-)
--
2.13.5 (Apple Git-94)
More information about the Spice-devel
mailing list