-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
fs-sim/fs-sim/src/System/FS/Sim/STM.hs
Lines 77 to 86 in 2d85d65
sim :: FSSimT m a -> m a | |
sim m = do | |
st <- atomically $ takeTMVar var | |
runFSSimT m st >>= \case | |
Left e -> do | |
atomically $ putTMVar var st | |
throwIO e | |
Right (a, st') -> do | |
atomically $ putTMVar var st' | |
pure a |
If an exception happens between takeTMVar
and putTMVar
, then the TMVar
will be left empty. This is a potential deadlock situation
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working