]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/IdxStack.pm
extindex: support graceful shutdown via QUIT/INT/TERM
[public-inbox.git] / lib / PublicInbox / IdxStack.pm
index e7e10de94da8cc3a9aa97322e052c9834a944146..c55c5c36790418a5579abd0f79a1b4075f9020b3 100644 (file)
@@ -11,6 +11,8 @@ use constant PACK_FMT => eval { pack('Q', 1) } ? 'A1QQH*H*' : 'A1IIH*H*';
 # start off in write-only mode
 sub new {
        open(my $io, '+>', undef) or die "open: $!";
+       # latest_cmt is still useful when the newest revision is a `d'(elete),
+       # otherwise we favor $sync->{latest_cmt} for checkpoints and {quit}
        bless { wr => $io, latest_cmt => $_[1] }, __PACKAGE__
 }