
I'm curious, is it possible that your new timeout implementation would fix this problem?: doesntWork :: Int -> Int doesntWork x = last $ cycle [x] test :: IO (Maybe Bool) test = timeout 1 $ evaluate $ doesntWork 5 == 5 -- never terminates, even with the timeout
From what I can gather, this problem is caused by a lack of context switches in the code for 'doesntWork' so I doubt that a new implementation of timeout would fix it, but I thought I'd ask :)
It's super annoying, especially when it happens when you're not expecting
it.
(btw, I've only tested the above code in ghc 6.x, so I have no idea if the
behavior is the same in 7)
- Job
On Mon, Feb 21, 2011 at 3:39 PM, Bas van Dijk
On 19 February 2011 00:04, Bas van Dijk
wrote: So, since the new implementation is not really faster in a representative benchmark and above all is buggy, I'm planning to ditch it in favour of the event-manager based timeout.
The patch is ready for review:
http://hackage.haskell.org/trac/ghc/attachment/ticket/4963/faster_timeout.dp...
Bas
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe