4 ms·
It's not going to be efficiently threaded like in Raku, but this is also possible in Perl 5 with a few modules from CPAN. https://metacpan.org/pod/IO::Async::Fu
by Grinnz 7y ago
It's not going to be efficiently threaded like in Raku, but this is also possible in Perl 5 with a few modules from CPAN. https://metacpan.org/pod/IO::Async::Function https://metacpan.org/pod/IO::Async::Function will maintain a preforked pool of processes (on Unix) or threads (on Windows), and return Futures, which can be used by fmap_concat from https://metacpan.org/pod/Future::Utils https://metacpan.org/pod/Future::Utils to make a very map-looking iteration. The experimental https://metacpan.org/pod/Future::AsyncAwait https://metacpan.org/pod/Future::AsyncAwait will make this even more natural in the future.
- Stubb 7y agoI'm continually astounded that threading involves jumping through so many hoops in 2019. If you want a language that provides a REPL and easy threading, your choices are few and far between.