Modulelifted-base-0.2.3.12
Control.Concurrent.Lifted
Synopsis
- value rtsSupportsBoundThreads
- value dupChan
- value getChanContents
- value newChan
- value readChan
- value writeChan
- value writeList2Chan
- value fork
- value forkFinally
- value forkOS
- value forkOn
- value forkOnWithUnmask
- value forkWithUnmask
- value getNumCapabilities
- value isCurrentThreadBound
- value killThread
- value mkWeakThreadId
- value myThreadId
- value runInBoundThread
- value runInUnboundThread
- value setNumCapabilities
- value threadCapability
- value threadDelay
- value threadWaitRead
- value threadWaitWrite
- value yield
- value isEmptyMVar
- value mkWeakMVar
- value modifyMVar
- value modifyMVarMasked
- value modifyMVarMasked_
- value modifyMVar_
- value newEmptyMVar
- value newMVar
- value putMVar
- value readMVar
- value swapMVar
- value takeMVar
- value tryPutMVar
- value tryReadMVar
- value tryTakeMVar
- value withMVar
- value withMVarMasked
- value newQSem
- value signalQSem
- value waitQSem
- value newQSemN
- value signalQSemN
- value waitQSemN
- value throwTo
- data Chan
- newtype QSem
- data QSemN
- data ThreadId
- data MVar
- Packagelifted-base-0.2.3.12
- Exports55
- LicenceBSD-3-Clause
- SourceChan.hs
Chan is an abstract type representing an unbounded FIFO channel.
A ThreadId is an abstract type representing a handle to a thread. ThreadId is an instance of Eq, Ord and Show, where the Ord instance implements an arbitrary total ordering over ThreadIds. The Show instance lets you convert an arbitrary-valued ThreadId to string form; showing a ThreadId value is occasionally useful when debugging or diagnosing the behaviour of a concurrent program.
Note: in GHC, if you have a ThreadId, you essentially have a pointer to the thread itself. This means the thread itself can't be garbage collected until you drop the ThreadId. This misfeature would be difficult to correct while continuing to support threadStatus.
An MVar (pronounced "em-var") is a synchronising variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full.