[Spice-devel] [PATCH spice-streaming-agent v2 0/4] Add a SpiceStream class for stream access

Christophe de Dinechin christophe at dinechin.org
Fri Nov 10 12:53:08 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.

Christophe de Dinechin (4):
  style: Remove useless whitespace
  style: Use C++ style for declaring structs
  Use RAII to cleanup stream in case of exception or return
  Move all stream-related functions within SpiceStream class

 src/spice-streaming-agent.cpp | 96 +++++++++++++++++++++++++------------------
 1 file changed, 55 insertions(+), 41 deletions(-)

-- 
2.13.5 (Apple Git-94)



More information about the Spice-devel mailing list