
23 Nov
2007
23 Nov
'07
4:14 p.m.
Hello Haskellers, I have two questions for you: * Is there a Haskell binding to the ualarm() function in unistd.h? I looked in System.Posix.Signals, but there's just a binding for alarm(). * Is there a way to interrupt a blocking operation on another thread? I thought about throwTo, but that seems like overkill. Here's some example code: import Control.Concurrent main :: IO () main = do tid <- myThreadId forkIO $ interruptMain tid getChar interruptMain :: ThreadId -> IO () interruptMain mainThreadId = do threadDelay 5000000 interrupt mainThreadId -- This is probably going to end up being throwTo, isn't it?
6391
Age (days ago)
6391
Last active (days ago)
0 comments
1 participants
participants (1)
-
ROBERT DOUGLAS HOELZ