[Xcb] [RFC] first-class queues vs. callbacks

Josh Triplett josh at joshtriplett.org
Sat Mar 2 17:21:48 PST 2013


On Sat, Mar 02, 2013 at 09:44:40PM +0100, Daniel Martin wrote:
> while we are (or I'm) at finding a nice alternative to the current
> behaviour of xcb I would like to throw in yet another idea. I've talked
> to a college of mine and he asked: why it has to be queues, why not
> callbacks?

Historically, XCB has had an aversion to callbacks, due to the more
complex control flow, and poor interactions with the locking model.  The
callback model also doesn't necessarily fit well with toolkits, and
toolkits represent the primary user of XCB; we don't want to optimize
specifically for apps written directly on top of XCB.  In
addition to that, it seems quite simple to build a callback model on top
of a queue, isolating the complexity in a separate library, and allowing
users to select between different event models.

- Josh Triplett


More information about the Xcb mailing list