diff options
Diffstat (limited to 'libraries/base/GHC/Conc.hs')
-rw-r--r-- | libraries/base/GHC/Conc.hs | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/libraries/base/GHC/Conc.hs b/libraries/base/GHC/Conc.hs new file mode 100644 index 0000000000..f1708b33d4 --- /dev/null +++ b/libraries/base/GHC/Conc.hs @@ -0,0 +1,113 @@ +{-# LANGUAGE Unsafe #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} +{-# OPTIONS_GHC -fno-warn-missing-signatures #-} +{-# OPTIONS_HADDOCK not-home #-} + +----------------------------------------------------------------------------- +-- | +-- Module : GHC.Conc +-- Copyright : (c) The University of Glasgow, 1994-2002 +-- License : see libraries/base/LICENSE +-- +-- Maintainer : cvs-ghc@haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- Basic concurrency stuff. +-- +----------------------------------------------------------------------------- + +-- No: #hide, because bits of this module are exposed by the stm package. +-- However, we don't want this module to be the home location for the +-- bits it exports, we'd rather have Control.Concurrent and the other +-- higher level modules be the home. Hence: #not-home + +module GHC.Conc + ( ThreadId(..) + + -- * Forking and suchlike + , forkIO + , forkIOWithUnmask + , forkOn + , forkOnWithUnmask + , numCapabilities + , getNumCapabilities + , setNumCapabilities + , getNumProcessors + , numSparks + , childHandler + , myThreadId + , killThread + , throwTo + , par + , pseq + , runSparks + , yield + , labelThread + , mkWeakThreadId + + , ThreadStatus(..), BlockReason(..) + , threadStatus + , threadCapability + + -- * Waiting + , threadDelay + , registerDelay + , threadWaitRead + , threadWaitWrite + , threadWaitReadSTM + , threadWaitWriteSTM + , closeFdWith + + -- * TVars + , STM(..) + , atomically + , retry + , orElse + , throwSTM + , catchSTM + , alwaysSucceeds + , always + , TVar(..) + , newTVar + , newTVarIO + , readTVar + , readTVarIO + , writeTVar + , unsafeIOToSTM + + -- * Miscellaneous + , withMVar +#ifdef mingw32_HOST_OS + , asyncRead + , asyncWrite + , asyncDoProc + + , asyncReadBA + , asyncWriteBA +#endif + +#ifndef mingw32_HOST_OS + , Signal, HandlerFun, setHandler, runHandlers +#endif + + , ensureIOManagerIsRunning + , ioManagerCapabilitiesChanged + +#ifdef mingw32_HOST_OS + , ConsoleEvent(..) + , win32ConsoleHandler + , toWin32ConsoleEvent +#endif + , setUncaughtExceptionHandler + , getUncaughtExceptionHandler + + , reportError, reportStackOverflow + ) where + +import GHC.Conc.IO +import GHC.Conc.Sync + +#ifndef mingw32_HOST_OS +import GHC.Conc.Signal +#endif |