Commit b26cf9b6 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-01-25 12:28:03 by simonmar]

Actually test tryTakeMVar on a full MVar, as well as an empty one.
parent aee7f7b1
......@@ -13,6 +13,9 @@ main = do
r <- timeout 5 (tryTakeMVar m) (putStrLn "timed out!" >> return Nothing)
print (r :: Maybe Int)
m <- newMVar True
r <- timeout 5 (tryTakeMVar m) (putStrLn "timed out!" >> return Nothing)
print r
timeout
:: Int -- secs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment