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

Barton C Massey bart at cs.pdx.edu
Sun Jan 6 09:52:17 PST 2008

In message <200801061423.02484.maximlevitsky at gmail.com> you wrote:
> Yes, I have thought about this, a single thread that gets
> all events, and wakes other ones,.. but what is wrong with
> making each thread have a separate connection, what are
> the disadvantages?

You may run servers on some wacky machines out of
connections after just a few.  You'll also burn some
client-side resources.  This is probably not a showstopper
for three connections, but utterly no good for 100.

You have to synchronize the activities of the various
connections.  The X server is trying to help you by
processing requests on a connection sequentially, so that
you know when things are done etc.  It will process requests
from multiple connections in an arbitrary order, though.  If
you are synchronizing threads on the client side, then you
probably also need to be synchronizing activities on the
server side.


More information about the Xcb mailing list