[Xcb] How to wake up the GUI thread in XCB?

Bart Massey bart at cs.pdx.edu
Mon May 25 10:09:06 PDT 2015


A (the?) primary intent of XCB was as a clean platform for people to build
innovative GUI toolkits on top of. Glad to hear you're working on one! The
questions are fine: I've enjoyed seeing the various alternatives discussed.

For the record, what I'd probably do: spawn a thread to deal with timers,
external fds, etc; spawn a second thread to read and process the X event
queue; spawn a third thread to run the GUI rendering process; spawn a
fourth thread for the computing engine if desired; have all the threads
communicate using a locked shared data structure of some kind.

But that's just me. You have lots of choices, and they're all going to be
fine.

On Mon, May 25, 2015 at 6:00 AM Cosmin Apreutesei <
cosmin.apreutesei at gmail.com> wrote:

> > Uhm, which "[1]"?
>
> Sorry:
> http://xcb.freedesktop.org/manual/group__XCB__Core__API.html#ga537e3cea89389382533957444eaa13fd
>
> > Eventfd works, too. ;-)
>
> Same thing :)
>
> [context: I know that using XCB in conjunction with other UNIX APIs
> doesn't seem like a big deal for UNIX people because they assume the
> user will use C, after all it's a C API, and all other headers are
> available, etc., what's the big deal, right? But XCB made efforts to
> keep binary compat between 32bit and 64bit, avoid using macros etc. so
> it will be easy to bind to hi-level languages without having to buy
> into huge runtimes like Qt and GTK. That's what I'm trying to do, I'm
> trying to make a portable GUI lib for LuaJIT[1] so I am looking for a
> solution that will have as few dependencies as possible to other UNIX
> APIs to avoid having to bind those too and having them as
> dependencies. To a C programer it looks like I complain a lot for no
> reason.]
>
> [1] https://luapower.com/nw
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20150525/f90b3652/attachment.html>


More information about the Xcb mailing list