ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/dns
(Generate patch)

Comparing Coro/eg/dns (file contents):
Revision 1.3 by root, Sat Apr 14 15:06:06 2007 UTC vs.
Revision 1.4 by root, Mon Nov 24 04:56:38 2008 UTC

1#!/usr/bin/perl 1#!/usr/bin/perl
2 2
3use Coro; 3use Coro;
4use Coro::Event;
5use Coro::Util; 4use Coro::Util;
5use Coro::AnyEvent;
6 6
7use Socket; 7use Socket;
8 8
9# do some asynchronous hostname resolution 9# do some asynchronous hostname resolution
10
11async { loop }; # run the Event loop as a separate coroutine
12 10
13my @pid; 11my @pid;
14 12
15for my $x (1..255) { 13for my $x (1..255) {
16 push @pid, async { 14 push @pid, async {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines