Coro

 use Coro;
 use LWP::UserAgent;
 
 async {
     print "Hello, world\n";
 };
 
 my $ua = LWP::UserAgent->new;
 my $res = $ua->get('http://www.goo.ne.jp');
 print $res->title, "\n";
 
 cede;
 goo
 called
 use Coro;
 use LWP::UserAgent;
 
 async {
     print "Hello, world\n";
 };
 
 cede;
 
 my $ua = LWP::UserAgent->new;
 my $res = $ua->get('http://www.goo.ne.jp');
 print $res->title, "\n";
 called
 goo

参考

http://search.cpan.org/perldoc?Coro


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS