problem with multithreaded application and Xlib

Rami Ylimäki rami.ylimaki at vincit.fi
Thu Sep 30 09:37:50 PDT 2010


  On 09/30/2010 06:44 PM, Francesco Abbate wrote:
>> What happens is that the secondary thread blocks during the XSync
>> operation until the main thread receive some events.
>>

Hi,

XNextEvent may call _XReadEvents and XSync calls _XReply. If XNextEvent 
is called before XSync from a different thread and there are no events, 
this may happen. It's a bug in Xlib implementation. Search for "FIXME" 
in http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/xcb_io.c. I 
don't know if you are facing this problem but based on your description 
that may be the case.

>> Best regards,
>> Francesco
>>

-- Rami



More information about the xorg-devel mailing list