4 ms·
Is that a bit like Go's `go` keyword? edit: that is, as far as I can tell, after a quick Google, it's not too different from Python's Thread object.
by weff_ 7y ago
Is that a bit like Go's `go` keyword?
edit: that is, as far as I can tell, after a quick Google, it's not too different from Python's Thread object.
- pmezard 7y agoIt is, python Threads are system threads.
- b2gills 7y agoThe `start` statement prefix operator is a bit like Go's `go` keyword. (In that when I translate Go into Raku, I usually replace `go` with `start`.) my Channel \input .= new; my Channel \output .= new; start for input -> \message { output.send(message) } start for output -> \message { say message } input.send(5); But what he was really talking about is something more like the following. sub foo () { sleep 10; 42 } # ___ # V V my $delayed-result = start foo(); say 'Hello World'; # Hello World say $delayed-result.status; # Planned say await $delayed-result; # 42