Skip to content
Snippets Groups Projects
Commit c5e9e310 authored by Simon Marlow's avatar Simon Marlow
Browse files

avoid a crash: don't return unless the run queue has some threads in it

parent 2ad5ee9e
No related branches found
No related tags found
No related merge requests found
...@@ -45,14 +45,11 @@ awaitEvent(rtsBool wait) ...@@ -45,14 +45,11 @@ awaitEvent(rtsBool wait)
return; return;
} }
if (!ret) { // The return value from awaitRequests() is a red herring: ignore
return; /* still hold the lock */ // it. Return to the scheduler if !wait, or
}
// Return to the scheduler if:
// //
// - we were interrupted // - we were interrupted
// - new threads have arrived // - the run-queue is now non- empty
} while (wait } while (wait
&& sched_state == SCHED_RUNNING && sched_state == SCHED_RUNNING
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment