Commit 3a21a064 authored by sof's avatar sof
Browse files

[project @ 1999-05-14 19:49:22 by sof]

Added (yield :: IO ()) - the underlying bits were already there, really.
parent fd595923
......@@ -29,6 +29,8 @@ module Concurrent (
, par -- :: a -> b -> b
, seq -- :: a -> b -> b
, fork -- :: a -> b -> b
, yield -- :: IO ()
{-threadDelay, threadWaitRead, threadWaitWrite,-}
-- MVars
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment