-
-
Save zoffixznet/86d1eaa8897bbe7c092d1368a99f64c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $s = IO::Socket::Async.listen('127.0.0.1', 15555); | |
say "$s.perl() {$s.WHERE}"; | |
start react { | |
my $b1 := ({ | |
start @ = | |
supply { | |
say 'got here ' ~ $*AWAITER; | |
my $b2 := ({ | |
say 'but not here ' ~ $*AWAITER; | |
exit; | |
} does role B2 {}); | |
say "b2: {$b2.WHERE} $b2.^name() $b2.perl()"; | |
WHENEVER $_, $b2 | |
}.list | |
} does role B1 {}); | |
say "b1: {$b1.WHERE} $b1.^name() $b1.perl()"; | |
WHENEVER $s, $b1; | |
} | |
sleep .1; | |
.print: "x\n" with IO::Socket::INET.new: :host<127.0.0.1>, :15555port; | |
sleep 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment