Portability | non-portable (requires STM) |
---|---|
Stability | experimental |
Maintainer | libraries@haskell.org |
TVar: Transactional variables
TVars
data TVar a
Shared memory locations that support atomic memory transactions.
IO
version of newTVar
. This is useful for creating top-level
TVar
s using System.IO.Unsafe.unsafePerformIO, because using
atomically
inside System.IO.Unsafe.unsafePerformIO isn't
possible.
registerDelay :: Int -> IO (TVar Bool)
Set the value of returned TVar to True after a given number of microseconds. The caveats associated with threadDelay also apply.