hugs thread scheduling
Alastair David Reid
reid@cs.utah.edu
02 Feb 2002 05:45:05 -0700
Conal:
> Hugs still (again?) has a thread scheduling behavior that breaks
> Fran immediately. The required Prelude tweak is described at
> http://research.microsoft.com/~conal/Fran/news.htm under the "1.15"
> heading. Will this Prelude change get made at some point?
Sigbjorn:
> Maybe (I have to think through the consequences a bit first), but
> until that time you may want to insert calls to 'yield' immediately
> after a call to 'forkIO' -- that should have the same effect as the
> tweak you refer to.
Changing the thread scheduling behaviour could break HGL so please be
very careful. The testsuite has a number of tests for the scheduling
behaviour. Some of these are simply to detect changes - they indicate
that something might break not that something necessarily has. At
least one is to check that the consumer-producer pattern used in HGL
(and elsewhere) works.
[Hmmm, I thought I'd mailed Conal about the change when I made it - I
certainly meant to.]
--
Alastair Reid reid@cs.utah.edu http://www.cs.utah.edu/~reid/