Skip to content

Commit

Permalink
Use eager pick(*) where it makes sense
Browse files Browse the repository at this point in the history
This makes at least EARLIEST a bit faster, and hopefully more stable.
  • Loading branch information
lizmat committed Apr 25, 2015
1 parent ecd3159 commit 9d74227
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/EnumMap.pm
Expand Up @@ -49,7 +49,7 @@ my class EnumMap does Associative { # declared in BOOTSTRAP
multi method perl(EnumMap:D:) {
self.^name
~ '.new('
~ self.pairs.pick(*).map({.perl}).join(', ')
~ self.pairs.pick(*,:eager).map({.perl}).join(', ')
~ ')';
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/asyncops.pm
Expand Up @@ -93,7 +93,7 @@ sub EARLIEST(@earliest,*@other,:$wild_done,:$wild_more,:$wait,:$wait_time) {

CHECK:
loop { # until something to return
for @todo.pick(*) -> $todo {
for @todo.pick(*,:eager) -> $todo {
my $kind := $todo[1];
my $contestant := $todo[2];

Expand Down

0 comments on commit 9d74227

Please sign in to comment.