use strict;
use warnings;
use base qw(PublicInbox::DS);
-use fields qw(rd);
my $ENABLED;
sub enabled { $ENABLED }
# fires in the next event loop iteration.
pipe($r, $w) or die "pipe: $!";
fcntl($w, 1031, 4096) if $^O eq 'linux'; # 1031: F_SETPIPE_SZ
- $self->SUPER::new($w);
- $self->{rd} = $r; # never read, since we never write..
+ $self->SUPER::new($w, 0);
+
+ # always writable, since PublicInbox::EvCleanup::event_step
+ # never drains wbuf. We can avoid wasting a hash slot by
+ # stuffing the read-end of the pipe into the never-to-be-touched
+ # wbuf
+ $self->{wbuf} = $r;
$self;
}
}
# Called by PublicInbox::DS
-sub event_write {
+sub event_step {
my ($self) = @_;
$self->watch_write(0);
_run_asap();