diff options
author | Tamar Christina <tamar@zhox.com> | 2019-08-30 21:47:44 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-07-15 16:41:02 -0400 |
commit | 8da15a09955926c4617d3468b84b3f3ca414d48a (patch) | |
tree | 463ad9f9aa29e6709e60e519b0f80893ba77ff85 /rts/Schedule.c | |
parent | 64d8f2fe2d27743e2986d2176b1aa934e5484d7a (diff) | |
download | haskell-8da15a09955926c4617d3468b84b3f3ca414d48a.tar.gz |
winio: Fix a scheduler bug with the threaded-runtime.
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r-- | rts/Schedule.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index fab357aa06..e3f582e967 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -318,19 +318,12 @@ schedule (Capability *initialCapability, Task *task) #if !defined(THREADED_RTS) if ( emptyRunQueue(cap) ) { - /* On the non-threaded RTS if the queue is empty and the last action was - blocked on an I/O completion port, then just wait till we're woken - up by the RTS with more work. */ - if (t && t->why_blocked == BlockedOnIOCompletion) - { - fprintf (stderr, "waiting: %d.\n", t->why_blocked); - awaitEvent (emptyRunQueue(cap)); - fprintf (stderr, "running: %d.\n", t->why_blocked); - continue; - } - continue; - -#if !defined(mingw32_HOST_OS) +#if defined(mingw32_HOST_OS) + /* Notify the I/O manager that we have nothing to do. If there are + any outstanding I/O requests we'll block here. If there are not + then this is a user error and we will abort soon. */ + awaitEvent (emptyRunQueue(cap)); +#else ASSERT(sched_state >= SCHED_INTERRUPTING); #endif } |