Skip to content
Snippets Groups Projects
Commit d2773c40 authored by sof's avatar sof
Browse files

[project @ 1997-11-29 20:40:50 by sof]

Added Ord instance to ThreadId; added note saying that thread identifiers are currently not implemented; renamed readChanContents to getChanContents
parent fc196f84
No related branches found
No related tags found
No related merge requests found
...@@ -510,7 +510,8 @@ redistribute their implementation of this module. ...@@ -510,7 +510,8 @@ redistribute their implementation of this module.
module Concurrent where module Concurrent where
data ThreadId -- thread identifiers data ThreadId -- thread identifiers
instance Eq ThreadId instance Eq ThreadId
instance Ord ThreadId
forkIO :: IO () -> IO ThreadId forkIO :: IO () -> IO ThreadId
killThread :: ThreadId -> IO () killThread :: ThreadId -> IO ()
...@@ -530,7 +531,7 @@ writeChan :: Chan a -> a -> IO () ...@@ -530,7 +531,7 @@ writeChan :: Chan a -> a -> IO ()
readChan :: Chan a -> IO a readChan :: Chan a -> IO a
dupChan :: Chan a -> IO (Chan a) dupChan :: Chan a -> IO (Chan a)
unReadChan :: Chan a -> a -> IO () unReadChan :: Chan a -> a -> IO ()
readChanContents :: Chan a -> IO [a] getChanContents :: Chan a -> IO [a]
writeList2Chan :: Chan a -> [a] -> IO () writeList2Chan :: Chan a -> [a] -> IO ()
data CVar a -- one element channels data CVar a -- one element channels
...@@ -584,10 +585,10 @@ Hugs does not provide the functions <tt/mergeIO/ or <tt/nmergeIO/ since these ...@@ -584,10 +585,10 @@ Hugs does not provide the functions <tt/mergeIO/ or <tt/nmergeIO/ since these
require preemptive multitasking. require preemptive multitasking.
<item> <item>
<tt/killThread/ has not been implemented yet on either system. Thread identities and <tt/killThread/ has not been implemented yet on
The plan is that <tt/killThread/ will raise an IO exception in the either system. The plan is that <tt/killThread/ will raise an IO
killed thread which it can catch --- perhaps allowing it to kill its exception in the killed thread which it can catch --- perhaps allowing -->
children before exiting. --it to kill its children before exiting.
<item> <item>
The <tt/Ord/ instance for <tt/ThreadId/s provides an arbitrary total ordering The <tt/Ord/ instance for <tt/ThreadId/s provides an arbitrary total ordering
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment