[reactive] filterMP on keyboard-event taking 100% cpu

1 view
Skip to first unread message

Mathijs Kwik

unread,
Apr 11, 2010, 6:38:34 AM4/11/10
to reac...@haskell.org
Hi all,

I decided to have another try with reactive and got the basics working.
I created a simple program that just beeps until a timeout is reached
or when a key gets pressed.

This works OK, so I wanted to take it a small step further.
Now, I only wanted to stop if the 'q' key is pressed (or timeout is reached).

I tried filterE, filterMP and the alternative definition of filterMP
found in the source.
I found that in all cases, one thread of the program immediately grabs
100% cpu and makes the program sluggish/unresponsive.

I'm on ghc 6.12.1 and compiled without any optimizations.

here is my example:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=24810
(everything works when "stopper" uses "keyevent" but breaks on "qevent¨)

Is there anything I can do to get the behavior I want?

Thanks,
Mathijs
_______________________________________________
Reactive mailing list
Reac...@haskell.org
http://www.haskell.org/mailman/listinfo/reactive

Reply all
Reply to author
Forward
0 new messages