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

Maxim Levitsky maximlevitsky at gmail.com
Mon Jan 7 00:41:39 PST 2008


On Monday, 7 January 2008 10:24:53 Barton C Massey wrote:
> 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
> 

Thanks,
I now understand this completely.

Best regards,
	Maxim Levitsky


More information about the Xcb mailing list