thread priorities?

John Meacham john at
Fri Mar 31 04:56:07 EST 2006

On Fri, Mar 31, 2006 at 10:30:51AM +0100, Malcolm Wallace wrote:
> > 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
> ordering.

Well, that is just the sort of complication I wanted to avoid by keeping
them simple. I did not want to specify a scheduling algorithm in
particular. In cooperative systems, it is quite convinient to have some
control over which thread is run next, however, preemptive systems might
as well ignore them as eventually every thread will get its time.

It is not that important to me though. I'll probably implement it as an
extension in jhc since it is straightforward, but have no particular
attachment to it being in the standard if others don't feel it belongs
in there.


John Meacham - ⑆⑆john⑈

More information about the Haskell-prime mailing list