<div dir="ltr"><div>Oh well, thank you for the reply :) I am trying to do some networking stuff in the X Monad. Do you think there is some workaround such that I do the networking in an additional thread and then when it is done I fire some X11 event that XMonad can be programed to handle and then it can read the data recovered from the network and display it?<br><br></div>Thanks<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 21, 2015 at 10:07 PM, Brandon Allbery <span dir="ltr"><<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><br><div class="gmail_quote">On Sat, Nov 21, 2015 at 4:59 PM, Ernesto Rodriguez <span dir="ltr"><<a href="mailto:neto@netowork.me" target="_blank">neto@netowork.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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).</blockquote></div><br></span>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.)</div><div class="gmail_extra">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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">(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.)<span class="HOEnZb"><font color="#888888"><br><div><br></div>-- <br><div><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Ernesto Rodriguez<br></div><div><br></div><div>Masters Student</div><div>Computer Science</div><div>Utrecht University</div><div><br></div><div><a href="http://www.netowork.me" target="_blank">www.netowork.me</a></div><div><a href="http://github.com/netogallo" target="_blank">github.com/netogallo</a></div><div><br></div><div><br></div></div></div>
</div>