Skip to content

Commit

Permalink
Make Supply.zip() 'done' when the first supply 'done'
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Correa committed Nov 24, 2017
1 parent 3166400 commit 1d0dae8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Supply.pm
Expand Up @@ -1238,12 +1238,14 @@ my class Supply does Awaitable {
whenever $supply -> \val {
@values[$index].push(val);
emit( [[&with]] @values.map(*.shift) ) if all(@values);
LAST { done }
}
}
else {
whenever $supply -> \val {
@values[$index].push(val);
emit( $(@values.map(*.shift).list.eager) ) if all(@values);
LAST { done }
}
}
}
Expand Down

0 comments on commit 1d0dae8

Please sign in to comment.