[Xcb] [RFC] XCB without use of malloc()

Barton C Massey bart at cs.pdx.edu
Mon Jan 7 00:24:53 PST 2008


In message <200801070502.33119.maximlevitsky at gmail.com> you wrote:
> If I have several threads, and each serving its own subset
> of windows, and the subset is a top level window with its
> children, is it ok for each thread to open a separate
> connection to X (the threads are more like separate
> applications in that case) ?

It's definitely "ok".  The server and XCB have a bunch of
machinery that makes it pretty easy for you not to do that,
and just have each thread more-or-less pretend it owns the
connection, but if you want to open a connection per window
group it certainly doesn't hurt anything.  The "less" is
mostly what you described earlier; each event will be
consumed by exactly one thread.  But note that with XCB
multiple threads can be making requests and receiving
replies over a shared connection, and it will all just work.

    Bart


More information about the Xcb mailing list