modifyMVar_

modifyMVar_ :: MVar a -> (a -> IO a) -> IO ()
base Control.Concurrent.MVar
A safe wrapper for modifying the contents of an MVar. Like withMVar, modifyMVar will replace the original contents of the MVar if an exception is raised during the operation.
modifyMVar_ :: MVar a -> (a -> IO a) -> IO ()
base GHC.Conc.Sync