10 Sep
2002
10 Sep
'02
3:48 p.m.
At 2002-09-10 03:03, Koen Claessen wrote:
What is the recommended way of implementing the function:
timeOut :: Int -> IO a -> IO (Maybe a)
which takes a maximum number of seconds (say), an IO action, and tries to run the IO action in the specified time. If it succeeds, it returns just the answer, otherwise it returns Nothing.
Sounds rather unsafe. What happens to the IO action after the specified time? -- Ashley Yakeley, Seattle WA