Shared memory locations that support atomic memory transactions.
Modulerebase-1.21.2Haskell2010
Rebase.Control.Concurrent.STM.TVar
- 1 type
- 11 values
- Packagerebase-1.21.2
- Exports12
- LanguageHaskell2010
- LicenceMIT
- SourceSync.hs
Mutate the contents of a TVar. N.B., this version is non-strict.
Strict version of modifyTVar.
Like modifyTVar' but the function is a simple state transition that can return a side value which is passed on as the result of the STM.
Swap the contents of a TVar for a new value.
Switch the value of returned TVar from initial value False to True after a given number of microseconds. The caveats associated with threadDelay also apply.
Be careful not to exceed maxBound :: Int, which on 32-bit machines is only
2147483647 μs, less than 36 minutes.
Create a new TVar holding a value supplied
IO version of newTVar. This is useful for creating top-level
TVars using unsafePerformIO, because using
atomically inside unsafePerformIO isn't
possible.
Return the current value stored in a TVar.
Write the supplied value into a TVar.