[Haskell-cafe] How does RTS judge that a STM transaction is blocked?

Magicloud Magiclouds magicloud.magiclouds at gmail.com
Tue Feb 10 06:59:48 UTC 2015


Just found out that, the two functions of waitForEvent and waitForError
cannot be run in "main" thread. I just forked them and used a getChar to
block the program, and everything just went smooth. No idea what to
proceed....

On Wed, Feb 4, 2015 at 8:59 PM, Magicloud Magiclouds <
magicloud.magiclouds at gmail.com> wrote:

> Hi,
>
>   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 "thread blocked indefinitely in an STM transaction" when I
> waitForEvent.
>
>   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.
>
>   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.
>
>   So what is that? And how should I debug it?
>
> --
> 竹密岂妨流水过
> 山高哪阻野云飞
>
> And for G+, please use magiclouds#gmail.com.
>



-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20150210/cf770a5d/attachment.html>


More information about the Haskell-Cafe mailing list