[Spice-devel] [PATCH spice] Provide thread safety between spice_server_playback_put_samples and snd_set_playback_latency.

2014-09-24 Thread Jeremy White
A MsgMainMultiMediaTime message on the main channel will be relayed through main_dispatcher so as to be fired in the context of the main (not worker) thread. In qemu, that thread happens to also be the thread that drives the audio channel, so it works. In XSpice, it is a different thread, which l

Re: [Spice-devel] Help with solving a thread safety issue

2014-09-24 Thread Jeremy White
[snip] > So we should be good with that code here. Thanks for doing that analysis; that is interesting. I guess it's good news that the bug I found affects only Xspice audio users. I have to admit I find the overall structure of the code somewhat troubling. I'll go ahead and submit my patc

Re: [Spice-devel] Help with solving a thread safety issue

2014-09-24 Thread Christophe Fergeau
Hey, On Fri, Sep 19, 2014 at 10:22:16AM -0500, Jeremy White wrote: > This thread veered; I'd like to bring it back, if I can. > > I've got a clear case of thread unsafety in XSpice. > spice_server_playback_put_samples is called from a different thread than the > main thread. If the main thread c