Skip to content

Instantly share code, notes, and snippets.

@jonathanstowe
Created April 28, 2015 08:44
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 jonathanstowe/fe573758f3490a529f68 to your computer and use it in GitHub Desktop.
Save jonathanstowe/fe573758f3490a529f68 to your computer and use it in GitHub Desktop.
Channel.list go boom!
my $c = Channel.new;
await (^10).map: {
start {
my $r = rand;
sleep $r;
$c.send($r);
}
}
$c.close;
await (^10).map: {
start {
for $c.list -> $item {
say "$_ : $item";
}
}
}
__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment