[project @ 2002-02-05 10:06:24 by simonmar]
authorsimonmar <unknown>
Tue, 5 Feb 2002 10:06:24 +0000 (10:06 +0000)
committersimonmar <unknown>
Tue, 5 Feb 2002 10:06:24 +0000 (10:06 +0000)
commit84a29fdd257e9647acd2e5af91ee37f817b93fcb
tree86da67cdde39bbd14b90b5812ffc9621827efc8a
parente9f0f9d7bcfca13776e7aa465b7ab539a5dace73
[project @ 2002-02-05 10:06:24 by simonmar]
Fix bad bugs in deleteAllThreds: we were looping through the thread
queues calling deleteThread() on each thread as we go, but calling
deleteThread() has the side effect of removing the thread from the
relevant queue, so we would end up breaking out of the loop after
processing only a single thread.

This may fix problems like "resurrectThreads: thread blocked in a
strange way" seen after pressing ^C.

Aside: we really shouldn't be using deleteThread() at all, since it
doesn't give the thread a chance to clean up & release locks.  To be
well-behaved a program has to catch ^C itself at the moment.
ghc/rts/Schedule.c