Time out

Ashley Yakeley ashley@semantic.org
Tue, 10 Sep 2002 03:18:41 -0700


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