Commit c51229b2 authored by Simon Marlow's avatar Simon Marlow

waitForReturnCapability: fix logic bug

The check for whether a Capability was free was inverted, which harmed
performance for callbacks.
parent a916885c
......@@ -500,7 +500,7 @@ waitForReturnCapability (Capability **pCap, Task *task)
if (cap == NULL) {
// Try last_free_capability first
cap = last_free_capability;
if (!cap->running_task) {
if (cap->running_task) {
nat i;
// otherwise, search for a free capability
cap = NULL;
......
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