[Xcb] [PATCH v2 libxcb] Prevent reply waiters from being blocked.

Rami Ylimäki rami.ylimaki at vincit.fi
Fri Oct 8 07:37:56 PDT 2010


  On 10/08/2010 03:40 PM, Josh Triplett wrote:
> I don't know that it makes sense to support a client misbehaving in that
> way.  For one thing, how do you tell the difference between such a read
> and a read of a future post-sequence-wrap cookie with the same value?
> For another, how does this work with multi-reply requests like
> ListFontsWithInfo?

Sequence number wrapping is a problem but I don't think this patch is 
introducing it. The behaviour could be different after the patch, but it 
seems to me that it's possible to have problems in that case even 
without the patch, because a client may choose to wait for old reply 
only after a wrap has happened. I don't know Xcb inside out so I might 
want to verify this though.

Also I can't see this patch introducing a problem with multi-reply 
requests that wouldn't already exist. Can you show me an example 
sequence that would cause problems with the patch but not without?

> Do you have a real-world example of a client that waits for the same
> reply multiple times?

I don't know of Xcb clients but all Xlib clients work like this 
currently. Xlib determines that a request is complete only if it 
receives no reply to it and calls xcb_wait_for_reply at least twice for 
each request.

Thanks for comments.

-- Rami



More information about the Xcb mailing list