… | |
… | |
15 | |
15 | |
16 | =cut |
16 | =cut |
17 | |
17 | |
18 | package Coro::Util; |
18 | package Coro::Util; |
19 | |
19 | |
20 | no warnings qw(uninitialized); |
20 | BEGIN { eval { require warnings } && warnings->unimport ("uninitialized") } |
21 | |
21 | |
22 | #use Carp qw(croak); |
22 | #use Carp qw(croak); |
23 | |
23 | |
24 | use Coro::Handle; |
24 | use Coro::Handle; |
25 | use Coro::Semaphore; |
25 | use Coro::Semaphore; |
… | |
… | |
28 | |
28 | |
29 | @EXPORT = qw( |
29 | @EXPORT = qw( |
30 | gethostbyname gethostbyaddr |
30 | gethostbyname gethostbyaddr |
31 | ); |
31 | ); |
32 | |
32 | |
33 | $VERSION = 0.7; |
33 | $VERSION = 0.8; |
34 | |
34 | |
35 | $MAXPARALLEL = 16; # max. number of parallel jobs |
35 | $MAXPARALLEL = 16; # max. number of parallel jobs |
36 | |
36 | |
37 | my $jobs = new Coro::Semaphore $MAXPARALLEL; |
37 | my $jobs = new Coro::Semaphore $MAXPARALLEL; |
38 | |
38 | |