Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix await @ps failing with "Must specify a Promise or Channel to awai…
…t on"

21:07 < moritz> that's because .map() picks the zero-arity candidate
21:08 < moritz> iterating zero elements at a time
  • Loading branch information
niner committed Aug 22, 2015
1 parent 0ca6b57 commit 5c509b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/asyncops.pm
Expand Up @@ -14,7 +14,7 @@ multi sub await(Channel:D $c) {
$c.receive
}
multi sub await(*@awaitables) {
@awaitables.eager.map(&await)
@awaitables.eager.map({await $_})
}

sub cas (\val,&code) { val = code(val) } # naive implementation of cas
Expand Down

0 comments on commit 5c509b1

Please sign in to comment.