uni-util-2.3.0.3: Utilities for the uniform workbench
Safe HaskellNone
LanguageHaskell2010

Util.Thread

Description

Basic Thread operations.

Synopsis

Documentation

data ThreadId #

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 will hopefully be corrected at a later date.

Instances

Instances details
Eq ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Ord ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Show ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

goesQuietly :: IO () -> IO () Source #

after :: Duration -> IO a -> IO a Source #

every :: Duration -> IO a -> IO () Source #

mapMConcurrent :: (a -> IO b) -> [a] -> IO [b] Source #

mapMConcurrent_ :: (a -> IO ()) -> [a] -> IO () Source #

mapMConcurrentExcep :: forall a b. (a -> IO b) -> [a] -> IO [b] Source #