From d083173e0ceecf2c0112758e8ceb1bfbf05268eb Mon Sep 17 00:00:00 2001 From: Timo Paulssen Date: Fri, 10 Oct 2014 11:54:40 +0200 Subject: [PATCH] fix a few wrongs with WINNER --- src/core/asyncops.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/asyncops.pm b/src/core/asyncops.pm index b968a71bac4..6e46c942d39 100644 --- a/src/core/asyncops.pm +++ b/src/core/asyncops.pm @@ -40,7 +40,7 @@ sub INVOKE_KV(&block, $key, $value?) { } sub WINNER(@winner, *@other, :$wild_done, :$wild_more, :$wait, :$wait_time is copy) { - my Num $until = $wait ?? nqp::time_n() + $wait !! Nil; + my Num $until = $wait ?? nqp::time_n() + $wait_time !! Nil; my constant $WINNER_KIND_DONE = 0; my constant $WINNER_KIND_MORE = 1; @@ -114,7 +114,7 @@ sub WINNER(@winner, *@other, :$wild_done, :$wild_more, :$wait, :$wait_time is co } # we have to wait - if $until && $nqp::time_n() >= $until { # we're done waiting + if $until && nqp::time_n() >= $until { # we're done waiting $action = $wait; last CHECK; }