Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
3a21a064
Commit
3a21a064
authored
May 14, 1999
by
sof
Browse files
[project @ 1999-05-14 19:49:22 by sof]
Added (yield :: IO ()) - the underlying bits were already there, really.
parent
fd595923
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/lib/concurrent/Concurrent.lhs
View file @
3a21a064
...
...
@@ -29,6 +29,8 @@ module Concurrent (
, par -- :: a -> b -> b
, seq -- :: a -> b -> b
, fork -- :: a -> b -> b
, yield -- :: IO ()
{-threadDelay, threadWaitRead, threadWaitWrite,-}
-- MVars
...
...
ghc/lib/std/PrelConc.lhs
View file @
3a21a064
...
...
@@ -18,6 +18,8 @@ module PrelConc
, raiseInThread -- :: ThreadId -> Exception -> IO ()
, par -- :: a -> b -> b
, seq -- :: a -> b -> b
, yield -- :: IO ()
{-threadDelay, threadWaitRead, threadWaitWrite,-}
-- MVars
...
...
@@ -68,6 +70,10 @@ myThreadId :: IO ThreadId
myThreadId = IO $ \s ->
case (myThreadId# s) of (# s1, id #) -> (# s1, ThreadId id #)
yield :: IO ()
yield = IO $ \s ->
case (yield# s) of s1 -> (# s1, () #)
-- "seq" is defined a bit wierdly (see below)
--
-- The reason for the strange "0# -> parError" case is that
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment