|
|
|
|
|
by librasteve
161 days ago
|
|
Here's the other Gleam concurrency example in Raku for good measure: my @promises;
sub MAIN() {
# Run loads of green threads, no problem
for ^200_000 {
spawn-greeter($++);
}
await Promise.allof(@promises);
}
sub spawn-greeter($i) {
@promises.push: start {
say "Hello from $i";
}
}
|
|