| Maintainer | Bas van Dijk <v.dijk.bas@gmail.com> , Roel van Dijk <vandijk.roel@gmail.com> |
|---|
Control.Concurrent.STM.Event
Description
An Event is a simple mechanism for communication between threads: one thread signals an event and other threads wait for it.
Each event has an internal State which is either Set or Cleared. This
state can be changed with the corresponding functions set and clear. The
wait function blocks until the state is Set. An important property of
setting an event is that all threads waiting for it are woken.
It was inspired by the Python Event object. See:
http://docs.python.org/3.1/library/threading.html#event-objects
This module is designed to be imported qualified. We suggest importing it like:
import Control.Concurrent.STM.Event ( Event ) import qualified Control.Concurrent.STM.Event as Event ( ... )