about summary refs log tree commit homepage
path: root/lib/PublicInbox/ProcessPipe.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-01 19:13:40 -1400
committerEric Wong <e@80x24.org>2021-01-02 22:38:51 +0000
commit93ae22374321c3f949102052f190c44fd45333b4 (patch)
tree9a95553400185b5d4d19a473a34c5fb66140f35d /lib/PublicInbox/ProcessPipe.pm
parent6dd3c17ed185c0ed4569541dae52e0570be4deca (diff)
downloadpublic-inbox-93ae22374321c3f949102052f190c44fd45333b4.tar.gz
This saves over 20ms with scripts that only use PublicInbox::Spawn.
Diffstat (limited to 'lib/PublicInbox/ProcessPipe.pm')
-rw-r--r--lib/PublicInbox/ProcessPipe.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/ProcessPipe.pm b/lib/PublicInbox/ProcessPipe.pm
index 400a22f3..e540dc22 100644
--- a/lib/PublicInbox/ProcessPipe.pm
+++ b/lib/PublicInbox/ProcessPipe.pm
@@ -5,7 +5,6 @@
 package PublicInbox::ProcessPipe;
 use strict;
 use v5.10.1;
-use PublicInbox::DS qw(dwaitpid);
 use Carp qw(carp);
 
 sub TIEHANDLE {
@@ -48,7 +47,8 @@ sub _close ($;$) {
                         carp "waitpid($pid, 0) = $wp, \$!=$!, \$?=$?";
                 }
         } else { # caller just undef-ed it, let event loop deal with it
-                dwaitpid $pid, $cb, $arg;
+                require PublicInbox::DS;
+                PublicInbox::DS::dwaitpid($pid, $cb, $arg);
         }
         $ret;
 }