On Sat, Dec 24, 2011 at 09:23:15AM +0100, Hans de Goede wrote:
> Hi,
> 
> First of all thanks for the review of this series!
> 
> On 12/23/2011 06:10 PM, Christophe Fergeau wrote:
> >Hi,
> >
> >On Mon, Dec 19, 2011 at 12:24:34PM +0100, Hans de Goede wrote:
> >>This is a preparation patch for handling usb packet completion in a
> >>separate thread.
> >
> >I haven't looked at the patches extending this, but I have 2 comments
> >already:
> >* the xmit_queue_lock + xmit_queue combination looks a lot like GAsyncQueue
> 
> You may be right there, but I also need a lock to protect the variable
> which protects the queue from new messages been queued by the usb event 
> handling
> thread after disconnect (and the queue has been cleared). Right now I can
> use the same lock for this, so sticking with the current code seems best.

Your call, there are g_async_queue_lock/_unlock functions so the
xmit_queue_blocked check could be protected with that.

> IOW the only interaction between the thread and the rest of spice-gtk
> is the queuing of SpiceMsgOut messages, which is relatively simple and as
> such should be quite safe.

Yeah, I know the 2 things are quite separated, but now someone hacking on
this code has to remember that sometimes we can be in a different thread,
in some other parts of the code in a coroutine context.
> 
> >Apart from this, the patch looks good.
> 
> Can I consider that an ack?

Yup

Christophe

Attachment: pgpk4u4L6ciXu.pgp
Description: PGP signature

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

Reply via email to