Skip to content

Instantly share code, notes, and snippets.

@kanatohodets
Created February 6, 2015 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanatohodets/b97a0da7e97c2f10389f to your computer and use it in GitHub Desktop.
Save kanatohodets/b97a0da7e97c2f10389f to your computer and use it in GitHub Desktop.
my $s = Supply.new;
my $done = Promise.allof((^10).map: {
start {
my $r = $_ * 0.1;
sleep $r;
$s.emit($r);
}
});
$s.tap: -> $thing {
say "got thing", $thing;
}
await $done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment