2 % (c) The AQUA Project, Glasgow University, 1995
4 \section[Concurrent]{Concurrent Haskell constructs}
6 A common interface to a collection of useful concurrency abstractions.
7 Currently, the collection only contains the abstractions found in the
8 {\em Concurrent Haskell} paper (presented at the Haskell Workshop
9 1995, draft available via \tr{ftp} from
10 \tr{ftp.dcs.gla.ac.uk/pub/glasgow-fp/drafts}.) plus a couple of
11 others. See the paper and the individual files containing the module
12 definitions for explanation on what they do.
17 par, seq, -- reexported from Parallel
19 threadWait, threadDelay,
27 -- IVars and MVars come from here, too
28 IVar(..), MVar(..), -- for convenience...
29 _IVar, _MVar, -- abstract
30 newEmptyMVar, takeMVar, putMVar, newMVar, readMVar, swapMVar,
31 newIVar, readIVar, writeIVar
42 import PreludeGlaST ( forkST )
43 import PreludePrimIO ( newEmptyMVar, newMVar, putMVar,
44 readMVar, swapMVar, takeMVar, _MVar,
45 newIVar, readIVar, writeIVar, _IVar,
47 threadWait, threadDelay
50 forkIO :: IO () -> IO ()
56 new_s `_fork_` (Right (), s)
58 _fork_ x y = case (fork# x) of { 0# -> parError#; _ -> y }