Commit 843211e0 authored by Simon Marlow's avatar Simon Marlow
Browse files

wakeUpSleepingThreads: fix off by one

The symptom of this bug is after the time of a threadDelay has
expired, the RTS does a whole slew of extra select() calls.
This should help with #1523, but it's not the whole story.
parent 48fb2b52
......@@ -61,7 +61,7 @@ wakeUpSleepingThreads(lnat ticks)
rtsBool flag = rtsFalse;
while (sleeping_queue != END_TSO_QUEUE &&
(int)(ticks - sleeping_queue->block_info.target) > 0) {
(int)(ticks - sleeping_queue->block_info.target) >= 0) {
tso = sleeping_queue;
sleeping_queue = tso->link;
tso->why_blocked = NotBlocked;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment