Malcolm.Wallace at cs.york.ac.uk
Fri Mar 31 04:30:51 EST 2006
> > Thinking about it some. I think we will need some sort of very basic
> > thread priorities.
> I'd rather not, if we can avoid it.
Agreed. If someone wants to provide them as an optional extra, fine.
(We had thread priorities In concurrent embedded Gofer, a long time ago.
They can certainly be useful when interfacing with hardware, but there
are other ways to achieve the same goals.)
As Simon says:
> Priorities come with a whole can of worms that I'd rather not deal with.
They certainly do. Unintentional priority inversion is the most basic
problem, covered early in any course on real-time systems.
> threadSetPriority :: ThreadID -> Int -> IO ()
In any case, if priorities were to be introduced, I would not use Ints
to represent them. How many priority levels are sufficient? A partial
ordering between ThreadIDs would be preferable. Sometimes priorities are
genuinely incomparable, so there is no point in forcing a particular
More information about the Haskell-prime