From: Eric Wong Date: Thu, 31 Dec 2020 13:51:53 +0000 (+0000) Subject: ds: clobber $in_loop first at reset X-Git-Tag: v1.7.0~1436 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=3823705b72199c61e8ed96aabd34d21a63fe153c;p=public-inbox.git ds: clobber $in_loop first at reset This may help ensure DESTROY callbacks will see in_loop before the others. --- diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index 4f1558c7..8a560ae8 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -66,8 +66,9 @@ Reset all state =cut sub Reset { + $in_loop = undef; # first in case DESTROY callbacks use this %DescriptorMap = (); - $in_loop = $wait_pids = $later_queue = $reap_armed = undef; + $wait_pids = $later_queue = $reap_armed = undef; $EXPMAP = {}; $nextq = $ToClose = $later_timer = $exp_timer = undef; $LoopTimeout = -1; # no timeout by default