Thread Wow! (Promise Syntax)
(41 answers)
Opened by Kuerbis at 2015-08-29 19:50 Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/usr/bin/env perl6 use v6; my $sleep = 10; my $p1 = start { sleep $sleep; say "eins" } my $p2 = start { sleep $sleep; say "zwei" } my $p3 = start { sleep $sleep; say "drei" } my $s = prompt "Yes or No?"; say $s; while ($p1|$p2|$p3).status eq 'Planned' { say "working..."; sleep 1; } |