On Tue, 26 Jan 2010 10:54:03 -0800
Thomas DuBuisson <thomas.dubuis...@gmail.com> wrote:

> > doEvent f usDelay = forkIO $
> >   threadDelay usDelay
> >   doEvent f usDelay
> >   f

Are you sure that's right ? It seems to be a memory-gobbling infinite
loop...

How about this:


f = putStrLn "foo"

doEvent f usDelay = do forkIO f
                       threadDelay usDelay
                       doEvent f 1000000

main = doEvent f 1000000

which seems to work.  That makes me suspicious :-|


Brian

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to