Commit c9674234 authored by sof's avatar sof
Browse files

[project @ 1999-05-11 14:38:47 by sof]

myThreadId doc'ed
parent 3d2c765b
......@@ -13,6 +13,7 @@ instance Eq ThreadId
instance Ord ThreadId
forkIO :: IO () -> IO ThreadId
myThreadId :: IO ThreadId
killThread :: ThreadId -> IO ()
data MVar a -- Synchronisation variables
......@@ -32,6 +33,7 @@ writeChan :: Chan a -> a -> IO ()
readChan :: Chan a -> IO a
dupChan :: Chan a -> IO (Chan a)
unReadChan :: Chan a -> a -> IO ()
isEmptyChan :: Chan a -> IO Bool
getChanContents :: Chan a -> IO [a]
writeList2Chan :: Chan a -> [a] -> IO ()
......@@ -95,6 +97,9 @@ plan is that in the future <tt/killThread/ will raise an exception in
the killed thread which it can catch --- perhaps allowing it to kill
its children before exiting.
The action <tt/myThreadId/ returns the <tt/ThreadId/ of the thread
which performs it.
<item>
The <tt/Ord/ instance for <tt/ThreadId/s provides an arbitrary total ordering
which might be used to build an ordered binary tree, say.
......@@ -111,4 +116,6 @@ time a thread gets to inspect the result and act upon it, other
threads may have accessed the <tt/MVar/ and changed the 'filled-in'
status of the variable.
The same proviso applies to <tt/isEmptyChan/.
</itemize>
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