don't throw BlockedIndefinitelyOn... in main thread
In the main thread UserInterrupt can be thrown to unblock a thread.
So the following program should wait for such an interrupt instead of throwing a BlockedIndefinitelyOnMVar exception
main = do
var <- newEmptyMVar
takeMVar var `catch`
(const $ putStrLn "UserInterrupt caught" :: AsyncException -> IO ())
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |