I haven't noticed this being a problem in practice, but
be consistent with the rest of the singleton stuff.
Since we always call Reset() at load time, only do
initialization in that sub and not at declaration.
use Carp qw(croak confess carp);
require File::Spec;
-my $nextq = []; # queue for next_tick
-my $WaitPids = []; # list of [ pid, callback, callback_arg ]
+my $nextq; # queue for next_tick
+my $WaitPids; # list of [ pid, callback, callback_arg ]
my $reap_timer;
our (
%DescriptorMap, # fd (num) -> PublicInbox::DS object
=cut
sub Reset {
%DescriptorMap = ();
+ $nextq = [];
$WaitPids = [];
$reap_timer = undef;
@ToClose = ();