Skip to content

Commit

Permalink
fix a few wrongs with WINNER
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Oct 10, 2014
1 parent c35341e commit d083173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/asyncops.pm
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit d083173

Please sign in to comment.