Alon Levy wrote:
On Sun, Jul 24, 2011 at 01:48:13PM +0300, Arnon Gilboa wrote:
prevent race between service control manager (SCM) & the service main thread.
use events for stop, logon, agent restart.
---
 vdservice/vdservice.cpp |   70 +++++++++++++++++++++++++++++-----------------
 1 files changed, 44 insertions(+), 26 deletions(-)


<snoopy>
+void VDService::set_control_event(int control_command)
+{
+ _control_command = control_command;

There may be an unhandled _control_command which will be overwritten
by this, no?

Thanks, you are right, although practically the events are discreetly distanced so it's unlikely to happen.
However, I'll replace it with a thread-safe queue.

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to