Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $channel = Channel.new();
- sub a {
- b();
- gather {
- loop {
- take $channel.poll() // do {
- b();
- $channel.receive();
- }
- }
- }
- }
- sub b() {
- $channel.send(3);
- $channel.send(4);
- }
- for a() -> $a {
- say $a;
- }
- ~
Advertisement
Add Comment
Please, Sign In to add comment