TVar package:base-prelude

Shared memory locations that support atomic memory transactions.
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.
Return the current value stored in a TVar. This is equivalent to
readTVarIO = atomically . readTVar
but works much faster, because it doesn't perform a complete transaction, it just reads the current value of the TVar.
Write the supplied value into a TVar.