newTMVar

newTMVar :: a -> STM (TMVar a)
stm Control.Concurrent.STM.TMVar
Create a TMVar which contains the supplied value.
newTMVarIO :: a -> IO (TMVar a)
stm Control.Concurrent.STM.TMVar
IO version of newTMVar. This is useful for creating top-level TMVars using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.