summaryrefslogtreecommitdiff
path: root/libraries/base/Control/Concurrent.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-03-29 13:56:39 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-03-29 13:56:39 +0000
commit54c33b21fb786be6719b3b4e9b9fb30dca7232a9 (patch)
treea59757b631d3b08183fcbb2a13fa411344dc8572 /libraries/base/Control/Concurrent.hs
parentbb01c72e18216fd8c95a8205c4f97bf1dc0a6bc2 (diff)
downloadhaskell-54c33b21fb786be6719b3b4e9b9fb30dca7232a9.tar.gz
add forkIOWithUnmask, forkOnIOWithUnmask; deprecate forkIOUnmasked
With forkIOUnmasked it wasn't possible to reliably set up an exception handler in the child thread, because exceptions were immediately unmasked. forkIOWithUnmask :: ((forall a . IO a -> IO a) -> IO ()) -> IO ThreadId forkOnIOWithUnmask :: Int -> ((forall a . IO a -> IO a) -> IO ()) -> IO ThreadId
Diffstat (limited to 'libraries/base/Control/Concurrent.hs')
-rw-r--r--libraries/base/Control/Concurrent.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/libraries/base/Control/Concurrent.hs b/libraries/base/Control/Concurrent.hs
index 514e2e9adf..732255b3b1 100644
--- a/libraries/base/Control/Concurrent.hs
+++ b/libraries/base/Control/Concurrent.hs
@@ -35,7 +35,7 @@ module Control.Concurrent (
forkIO,
#ifdef __GLASGOW_HASKELL__
- forkIOUnmasked,
+ forkIOWithUnmask,
killThread,
throwTo,
#endif
@@ -78,7 +78,7 @@ module Control.Concurrent (
forkOS,
isCurrentThreadBound,
runInBoundThread,
- runInUnboundThread
+ runInUnboundThread,
#endif
-- * GHC's implementation of concurrency
@@ -97,6 +97,10 @@ module Control.Concurrent (
-- ** Pre-emption
-- $preemption
+
+ -- * Deprecated functions
+ forkIOUnmasked
+
) where
import Prelude
@@ -105,8 +109,7 @@ import Control.Exception.Base as Exception
#ifdef __GLASGOW_HASKELL__
import GHC.Exception
-import GHC.Conc ( ThreadId(..), myThreadId, killThread, yield,
- threadDelay, forkIO, forkIOUnmasked, childHandler )
+import GHC.Conc hiding (threadWaitRead, threadWaitWrite)
import qualified GHC.Conc
import GHC.IO ( IO(..), unsafeInterleaveIO, unsafeUnmask )
import GHC.IORef ( newIORef, readIORef, writeIORef )