RosettaCodeData/Task/Concurrent-computing/Perl/concurrent-computing-2.pl

11 lines
167 B
Perl
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
use feature qw( say );
use Coro;
use Coro::Timer qw( sleep );
$_->join for map {
async {
sleep rand;
say @_;
} $_
} qw( Enjoy Rosetta Code );