From f4b8374442162769ea87c24bf90a0f86a2fdd9b7 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 5 Jan 2007 12:34:03 +0000 Subject: [PATCH 1/1] disable an incorrect ASSERTion in the non-THREADED_RTS case (bug #1067) --- rts/Schedule.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/rts/Schedule.c b/rts/Schedule.c index a11a15e..f67fcd9 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -1768,13 +1768,14 @@ scheduleHandleThreadBlocked( StgTSO *t // has tidied up its stack and placed itself on whatever queue // it needs to be on. -#if !defined(THREADED_RTS) - ASSERT(t->why_blocked != NotBlocked); - // This might not be true under THREADED_RTS: we don't have - // exclusive access to this TSO, so someone might have - // woken it up by now. This actually happens: try - // conc023 +RTS -N2. -#endif + // ASSERT(t->why_blocked != NotBlocked); + // Not true: for example, + // - in THREADED_RTS, the thread may already have been woken + // up by another Capability. This actually happens: try + // conc023 +RTS -N2. + // - the thread may have woken itself up already, because + // threadPaused() might have raised a blocked throwTo + // exception, see maybePerformBlockedException(). #ifdef DEBUG if (traceClass(DEBUG_sched)) { -- 1.7.10.4