Thread Wow! (Promise Syntax) (41 answers)
Opened by Kuerbis at 2015-08-29 19:50

Kuerbis
 2015-08-29 19:50
#181926 #181926
User since
2011-03-20
815 articles
BenutzerIn
[default_avatar]
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;
}

View full thread Wow! (Promise Syntax)