- my ($class, $pipe, $cb) = @_;
- my $self = fields::new($class);
- $self->SUPER::new($pipe);
- $self->{cb} = $cb;
- $self->watch_read(1);
- $self;
+ my ($class, $pipe, $worker_quit) = @_;
+ my $self = bless { cb => $worker_quit }, $class;
+ $self->SUPER::new($pipe, EPOLLIN|EPOLLONESHOT);