diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-08-31 06:49:08 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-08-31 06:49:08 +0000 |
commit | c51229b2bfd3b1a61d3966db894210ef848f0a6d (patch) | |
tree | d791153f4e64836207e63b544f293abaa12918cd | |
parent | a916885ce70142ae5c05cc9e28230c308821e3d6 (diff) | |
download | haskell-c51229b2bfd3b1a61d3966db894210ef848f0a6d.tar.gz |
waitForReturnCapability: fix logic bug
The check for whether a Capability was free was inverted, which harmed
performance for callbacks.
-rw-r--r-- | rts/Capability.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Capability.c b/rts/Capability.c index ddaba699a3..4264f0ff57 100644 --- a/rts/Capability.c +++ b/rts/Capability.c @@ -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; |