[xmonad] Multiple threads

Brandon Allbery allbery.b at gmail.com
Sat Nov 21 22:07:21 UTC 2015


On Sat, Nov 21, 2015 at 4:59 PM, Ernesto Rodriguez <neto at netowork.me> wrote:

> When I attempt doing things like that, I usually get a deadlock. Is there
> any way to do this (I know, X is old :( but no harm in asking).


You can't, no, X11 is essentially incapable of it. (To the extent that
gtk2/3 has hacks to forward stuff to the main thread.)
Individual threads can open their own connections, a trick you'll see in
various contribs, but you can't share stuff between them; the best you
could do is send clientMessages from one thread to the other.

(X11 has a call to "enable" multithreading. This wraps a Big Global Lock
around all of X11. Even if you're using xcb, apparently, since if xcb could
do it properly gtk wouldn't go to such lengths to avoid it.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20151121/64e773ba/attachment.html>


More information about the xmonad mailing list