about summary refs log tree commit homepage
path: root/lib/PublicInbox/EvCleanup.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-16 06:11:28 +0000
committerEric Wong <e@80x24.org>2019-06-16 06:36:46 +0000
commitc6e7de3579258b73aed9ee5f96c4cb25bb335c86 (patch)
tree2cf41bfd355431c74cdcc316840f9f2739ea215d /lib/PublicInbox/EvCleanup.pm
parent3c076ce7bb6ac638c49dc2fd533d2193b2a8dad2 (diff)
downloadpublic-inbox-c6e7de3579258b73aed9ee5f96c4cb25bb335c86.tar.gz
Having separate read/write callbacks in every class is too
confusing to my easily-confused mind.  Instead, give every class
an "event_step" callback which is easier to wrap my head around.

This will make future code to support IO::Socket::SSL-wrapped
sockets easier-to-digest, since SSL_write() can require waiting
on POLLIN events, and SSL_read() can require waiting on POLLOUT
events.
Diffstat (limited to 'lib/PublicInbox/EvCleanup.pm')
-rw-r--r--lib/PublicInbox/EvCleanup.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/EvCleanup.pm b/lib/PublicInbox/EvCleanup.pm
index f76fb681..c64e2388 100644
--- a/lib/PublicInbox/EvCleanup.pm
+++ b/lib/PublicInbox/EvCleanup.pm
@@ -25,7 +25,7 @@ sub once_init () {
         fcntl($w, 1031, 4096) if $^O eq 'linux'; # 1031: F_SETPIPE_SZ
         $self->SUPER::new($w);
 
-        # always writable, since PublicInbox::EvCleanup::event_write
+        # 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
@@ -57,7 +57,7 @@ sub _run_later () {
 }
 
 # Called by PublicInbox::DS
-sub event_write {
+sub event_step {
         my ($self) = @_;
         $self->watch_write(0);
         _run_asap();