ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/access.pl
(Generate patch)

Comparing Coro/myhttpd/access.pl (file contents):
Revision 1.13 by root, Thu Nov 29 02:30:04 2001 UTC vs.
Revision 1.14 by root, Fri Nov 30 03:02:23 2001 UTC

24} 24}
25 25
26sub wake_next { 26sub wake_next {
27 my $self = shift; 27 my $self = shift;
28 28
29 return unless $self->{conns} >= 0; 29 if ($self->{conns} >= 0) {
30
31 if (@{$self->{wait}}) { 30 while(@{$self->{wait}}) {
32 while() {
33 my $transfer = shift @{$self->{wait}}; 31 my $transfer = shift @{$self->{wait}};
34 if ($transfer) { 32 if ($transfer) {
35 $transfer->wake; 33 $transfer->wake;
36 last; 34 last;
37 } 35 }
49 47
50sub try { 48sub try {
51 my $self = shift; 49 my $self = shift;
52 my $timeout = Coro::Timer::timeout $_[0]; 50 my $timeout = Coro::Timer::timeout $_[0];
53 51
54 Coro::schedule; 52 $self->[2] or Coro::schedule;
55 53
56 return $self->[2]; 54 return $self->[2];
57} 55}
58 56
59sub wake { 57sub wake {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines