[Spice-devel] [PATCH vdagent-win 1/6] vdservice: add control events RHBZ #719140 #722980

Arnon Gilboa agilboa at redhat.com
Sun Jul 24 05:06:22 PDT 2011


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.



More information about the Spice-devel mailing list