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

Comparing Coro/myhttpd/httpd.pl (file contents):
Revision 1.37 by root, Sun Sep 2 01:03:53 2001 UTC vs.
Revision 1.39 by root, Sun Sep 2 12:23:04 2001 UTC

42my @pool; 42my @pool;
43 43
44# one "execution thread" 44# one "execution thread"
45sub handler { 45sub handler {
46 while () { 46 while () {
47 my $new = pop @newcons;
48 if ($new) { 47 if (@newcons) {
49 eval { 48 eval {
50 conn->new(@$new)->handle; 49 conn->new(@{pop @newcons})->handle;
51 }; 50 };
52 slog 1, "$@" if $@ && !ref $@; 51 slog 1, "$@" if $@ && !ref $@;
53 $connections->up; 52 $connections->up;
54 } else { 53 } else {
55 last if @pool >= $MAX_POOL; 54 last if @pool >= $MAX_POOL;
141 $self; 140 $self;
142} 141}
143 142
144sub DESTROY { 143sub DESTROY {
145 my $self = shift; 144 my $self = shift;
146
147 $::conns--; 145 $::conns--;
148
149 $self->eoconn; 146 $self->eoconn;
150} 147}
151 148
152# end of connection 149# end of connection
153sub eoconn { 150sub eoconn {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines