[xmonad] Re: Issue 317 in xmonad: Util.XSelection.putSelection repeatable hang

codesite-noreply at google.com codesite-noreply at google.com
Fri Oct 30 17:55:50 EDT 2009


Comment #9 on issue 317 by ale... at feldgendler.ru:  
Util.XSelection.putSelection repeatable hang
http://code.google.com/p/xmonad/issues/detail?id=317

gdb shows that the process hangs in XNextEvent(), which probably means it's  
within
the forked run of processEvent. "info threads" in gdb shows there's only  
one OS-
level thread.

Here is my version of what happened: forkIO doesn't have to create an  
actual thread,
it can be a “lightweight” thread  
<http://hackage.haskell.org/packages/archive/
base/3.0.3.0/doc/html/GHC-Conc.html#v%3AforkIO>. So it works as though it  
were a
real thread as long as you don't call into libraries. Because it's not a  
real
thread, the other thread doesn't get a chance to run while XNextEvent() is  
hanging.

Suggested solution: use forkOS instead of forkIO, as the documentation  
recommends
for situations when threads make blocking library calls.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


More information about the xmonad mailing list