Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created August 18, 2016 16:01
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 zoffixznet/5488a212d60abce818b7eacbb2ca0306 to your computer and use it in GitHub Desktop.
Save zoffixznet/5488a212d60abce818b7eacbb2ca0306 to your computer and use it in GitHub Desktop.
my $c-req = Channel.new;
my $c-read = Channel.new;
sub multi-thread-read {
$c-req.send: 'gimme';
$c-read.receive;
}
start { loop { say "Read value `{multi-thread-read}`" } }
loop { $c-req.receive and $c-read.send: get; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment