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.25 by root, Tue Dec 4 03:43:54 2001 UTC vs.
Revision 1.26 by root, Tue Dec 4 15:57:59 2001 UTC

6 [ 75_000_000, 1], 6 [ 75_000_000, 1],
7); 7);
8 8
9sub new { 9sub new {
10 my $class = shift; 10 my $class = shift;
11 bless { 11 my $self = bless {
12 slots => $_[0], 12 slots => $_[0],
13 lastspb => 0, 13 lastspb => 0,
14 avgspb => 0, 14 avgspb => 0,
15 }, $class; 15 }, $class;
16 $self->{reschedule} = Event->timer(
17 after => 10,
18 interval => 3,
19 cb => sub { $self->wake_next },
20 );
21 $self;
16} 22}
17 23
18sub start_transfer { 24sub start_transfer {
19 my $self = shift; 25 my $self = shift;
20 my $size = $_[0]; 26 my $size = $_[0];
68} 74}
69 75
70sub waiters { 76sub waiters {
71 $_[0]->sort; 77 $_[0]->sort;
72 @{$_[0]{wait}}; 78 @{$_[0]{wait}};
79}
80
81sub DESTROY {
82 my $self = shift;
83
84 $self->{reschedule}->cancel;
73} 85}
74 86
75package transfer; 87package transfer;
76 88
77use Coro::Timer (); 89use Coro::Timer ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines