Re: [Haskell-cafe] Concurrency question

7 Sep
2005
7 Sep
'05
6:21 a.m.
Donald Bruce Stewart wrote:
Can I ask if just using a `seq` works as well? That was enough (now I recall) for the watchdog code I posted earlier.
-- Don
In my case this doesn't work
timeout :: DeepSeq a => Int -> IO a -> IO (Maybe a) timeout n t = do res <- par_io timer thr --timer return res where thr = do res <- t return $! Just res timer = do threadDelay $ n * 1000 return Nothing
It's probably because "resolve" function has type
resolve :: CNF -> (Bool, [(Int,Int)]) So it should be sequenced deeper.
7240
Age (days ago)
7240
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry V'yal