Safe Haskell | None |
---|---|
Language | Haskell98 |
A toggle is a switch initially True, which can only be made false (when some action is performed, say). This module implements toggles, allowing atomic switching to false of 1 toggle, or 2 toggles together. To avoid deadlock we use a supply of unique integers.
Documentation
data SimpleToggle Source #
simpleToggle :: SimpleToggle -> IO Bool Source #
ifSimpleToggle :: SimpleToggle -> IO () -> IO () Source #