[Xcb] knowing when the X server will send the reply
Barton C Massey
bart at cs.pdx.edu
Mon Jan 28 14:21:42 PST 2008
In message <Pine.LNX.4.64.0801282304020.21427 at grozny.maths.univ-evry.fr> you wrote:
> > If you're very careful, you can do that with
> > select(2) or poll(2) on the file descriptor of the socket connected to
> > the X server, but there are subtle traps there too.
>
>
> raster already does that stuff for X events and xcb_poll_for_event (well,
> i wrote that xcb part, actually). We indeed do a select on the fd. If you
> want to look ath the code :
>
> http://web.enlightenment.org/viewvc/e17/libs/ecore/src/lib/ecore_x/ecore_x.c?annotate=1.130
>
> (lines 389, 646 and 671)
>
> and
>
> http://web.enlightenment.org/viewvc/e17/libs/ecore/src/lib/ecore/ecore_main.c?annotate=1.33
>
> (lines 107 and 284)
>
> thanks for the reply
As Jamey said, be careful. XCB is already being pretty
clever about using select on the connection fd for its own
purposes; watch out for races!
Bart
More information about the Xcb
mailing list