<div dir="ltr">More detail would be helpful, but sounds like an infinite (Async?) thread. Try<br><br>    bracket (newStablePtr a) freeStablePtr (const $ wait a)<br><br>+google to find out why.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-04 13:59 GMT+01:00 Magicloud Magiclouds <span dir="ltr"><<a href="mailto:magicloud.magiclouds@gmail.com" target="_blank">magicloud.magiclouds@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br><div>  I met an issue while I was using xhb. When a certain property of root window being changed, it was supposed to give me an AccessError. But actually I got "<span style="color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif;font-size:14px;line-height:22.3999996185303px">thread blocked indefinitely in an STM transaction" when I waitForEvent.</span></div><div><font color="#333333" face="Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif"><span style="font-size:14px;line-height:22.3999996185303px"><br></span></font></div><div><font color="#333333" face="Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif"><span style="font-size:14px;line-height:22.3999996185303px">  AFAIK, in xhb, it forks a thread to read what X server sends. Then parse and put it into a TChan. waitForEvent reads from the TChan.</span></font></div><div><font color="#333333" face="Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif"><span style="font-size:14px;line-height:22.3999996185303px"><br></span></font></div><div><font color="#333333" face="Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif"><span style="font-size:14px;line-height:22.3999996185303px">  It is reasonable to me that if X server did not send anything, then waitForEvent would be blocked. But apparently there are some other policies in RTS.</span></font></div><div><font color="#333333" face="Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif"><span style="font-size:14px;line-height:22.3999996185303px"><br></span></font></div><div><font color="#333333" face="Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif"><span style="font-size:14px;line-height:22.3999996185303px">  So what is that? And how should I debug it?<span class="HOEnZb"><font color="#888888"><br clear="all"></font></span></span></font><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div>竹密岂妨流水过<br>山高哪阻野云飞<br><br>And for G+, please use magiclouds#<a href="http://gmail.com" target="_blank">gmail.com</a>.</div>
</font></span></div></div></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>