Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 8db744b3363ca310f5c936688f676a0e > files > 62

perl-Coro-6.410.0-5.mga5.i586.rpm

#!/usr/bin/perl

use Coro::LWP; # should be use'd as early as possible

use Coro;
use Coro::AnyEvent;
use LWP::Simple;

$SIG{PIPE} = 'IGNORE';

my @pids;

for (1..1) {
   push @pid, async {
      print "starting to fetch http://www.google.de/\n";
      get "http://www.google.de/";
      print "fetched http://www.google.de/\n";
   };

   push @pid, async {
      print "starting to fetch http://www.yahoo.com/\n";
      get "http://www.yahoo.com/";
      print "fetched http://www.yahoo.com/\n";
   };
}

$_->join for @pid;