[Haskell-cafe] Re: Concurrency questions

Ben Franksen ben.franksen at online.de
Mon Jan 7 17:23:55 EST 2008


Spencer Janssen wrote:
> On Sun, Jan 06, 2008 at 11:30:53AM +0000, Andrew Coppin wrote:
>> 1. Is there some way to assign a "priority" to Haskell threads? (The
>> behaviour I'd like is that high priority threads always run first, and
>> low priority threads potentially never run at all unless there's an
>> available processor which is completely idle.)
> 
> Not in the current system.  It is not clear that thread priorities are so
> nice anyway (see 'priority inversion' on Wikipedia, for example).

As the wikipedia page also mentions well-known counter-measures, such as
priority inheritance and priority ceilings. For real-time applications,
priorities are a /must have/. Or at least, I can't see anything nicer that
could replace them.

Cheers
Ben



More information about the Haskell-Cafe mailing list