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

Comparing cvsroot/Coro/myhttpd/access.pl (file contents):
Revision 1.20 by root, Mon Dec 3 05:40:09 2001 UTC vs.
Revision 1.21 by root, Mon Dec 3 05:52:37 2001 UTC

44 } 44 }
45 } 45 }
46} 46}
47 47
48sub sort { 48sub sort {
49 $_[0]{wait} = [ 49 my @queue = grep $_, @{$_[0]{wait}};
50 sort { $b->{spb} <=> $a->{spb} } 50
51 grep { $_ && ($_->{spb} = ($::NOW-$_->{time})/($_->{size}||1)), $_ } 51 $_->{spb} = ($::NOW-$_->{time}) / ($_->{size} || 1) for @queue;
52 @{$_[0]{wait}}
53 ]; 52
53 $_[0]{wait} = [sort { $b->{spb} <=> $a->{spb} } @queue];
54} 54}
55 55
56sub waiters { 56sub waiters {
57 $_[0]->sort; 57 $_[0]->sort;
58 @{$_[0]{wait}}; 58 @{$_[0]{wait}};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines