[project @ 2004-08-09 14:27:53 by simonmar]
authorsimonmar <unknown>
Mon, 9 Aug 2004 14:27:53 +0000 (14:27 +0000)
committersimonmar <unknown>
Mon, 9 Aug 2004 14:27:53 +0000 (14:27 +0000)
commit05881ecab43dfc5c13e0065d52a3fc8848657b20
treeaa362fce6a3314f0c68aa432794a4b1eed853441
parent46d88d870471379348f5661a56dad6ce4d7f5588
[project @ 2004-08-09 14:27:53 by simonmar]
Two changes:

  - newly created or unblocked threads go to the back of the run
    queue.  This is fairer because it avoids possible starvation.
    Fixes problem with conc004 test going much slower with optimisation.

  - The context switch flag is only reset after a yield.  Previously,
    it was being reset before we ran a thread, which meant that a tick
    that arrived during GC would be lost, and a thread doing lots of
    GC could hog the CPU.  Now, GC is effectively counted as part of
    the last running thread's timeslice.

MERGE TO STABLE.
ghc/rts/Schedule.c