Created
December 5, 2020 21:09
-
-
Save ugexe/50f056eedbc7caba5df58b2ced2a8cda 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 $init-cwd = $*CWD.add("tmp"); | |
mkdir $init-cwd; | |
my @paths-to-use = (1..100).map({ "{$init-cwd}/$_".IO }); | |
mkdir $_ for @paths-to-use; | |
@paths-to-use.hyper(:batch(1)).map: { | |
my $rel-path = $_.relative($init-cwd); | |
say $rel-path; | |
die "weird path: {$rel-path}" if $rel-path.starts-with('.'); | |
react { | |
my $proc = Proc::Async.new("echo", $rel-path); | |
whenever $proc.start(:cwd($_)) { sink $_ } | |
} | |
} |
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
1 | |
1 | |
2 | |
3 | |
2 | |
3 | |
5 | |
5 | |
6 | |
5 | |
5 | |
6 | |
8 | |
7 | |
9 | |
7 | |
8 | |
9 | |
10 | |
11 | |
10 | |
12 | |
11 | |
12 | |
13 | |
14 | |
15 | |
13 | |
14 | |
15 | |
16 | |
17 | |
16 | |
17 | |
18 | |
19 | |
18 | |
20 | |
19 | |
20 | |
22 | |
21 | |
23 | |
21 | |
22 | |
23 | |
25 | |
24 | |
26 | |
25 | |
24 | |
28 | |
27 | |
26 | |
27 | |
29 | |
28 | |
29 | |
30 | |
31 | |
30 | |
31 | |
32 | |
34 | |
34 | |
32 | |
34 | |
34 | |
35 | |
36 | |
37 | |
35 | |
36 | |
37 | |
../38 | |
39 | |
40 | |
39 | |
40 | |
A worker in a parallel iteration (hyper or race) initiated here: | |
in block <unit> at relpath.raku line 7 | |
Died at: | |
weird path: ../38 | |
in block at relpath.raku line 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment