-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The Haddock for newTVarIO says:
IO version of newTVar. This is useful for creating top-level TVars using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.
But the Haddock for atomically says:
Using
atomicallyinside anunsafePerformIO... subverts some of guarantees that STM provides ... If a nested transaction is attempted, an exception is thrown by the runtime. It is possible to safely use atomically insideunsafePerformIO
So maybe it is possible, but you can't then run atomically on top again?
Metadata
Metadata
Assignees
Labels
No labels