BSD-3-Clause licensed and maintained by Bas van Dijk <[email protected]> Roel van Dijk

Module documentation for

This version can be pinned in stack with:[email protected]:57fa11cf4c6280b97d69c7860e19aafc0b2c280cd3a89ad60a8f87918b76b987,3512
  • Control
    • Control.Concurrent
      • Control.Concurrent.Broadcast
      • Control.Concurrent.Event
      • Control.Concurrent.Lock
      • Control.Concurrent.RLock
      • Control.Concurrent.ReadWriteLock
      • Control.Concurrent.ReadWriteVar
      • Control.Concurrent.STM
        • Control.Concurrent.STM.Lock

The concurrent-extra package offers among other things the following selection of synchronisation primitives:

  • Broadcast: Wake multiple threads by broadcasting a value.

  • Event: Wake multiple threads by signalling an event.

  • Lock: Enforce exclusive access to a resource. Also known as a binary semaphore or mutex. The package additionally provides an alternative that works in the STM monad.

  • RLock: A lock which can be acquired multiple times by the same thread. Also known as a reentrant mutex.

  • ReadWriteLock: Multiple-reader, single-writer locks. Used to protect shared resources which may be concurrently read, but only sequentially written.

  • ReadWriteVar: Concurrent read, sequential write variables.

Please consult the API documentation of the individual modules for more detailed information.

This package was inspired by the concurrency libraries of Java and Python.