+sub poke_dst {
+ my ($self) = @_;
+ if ($self->{base_type} eq 'maildir') {
+ my $t = time + 1;
+ utime($t, $t, "$self->{dst}/cur");
+ }
+}
+
+sub write_mail { # via ->wq_io_do
+ my ($self, $git_dir, $smsg) = @_;
+ my $git = $self->{"$$\0$git_dir"} //= PublicInbox::Git->new($git_dir);
+ git_async_cat($git, $smsg->{blob}, \&git_to_mail,
+ [$self->{wcb}, $smsg]);
+}
+
+sub wq_atexit_child {
+ my ($self) = @_;
+ delete $self->{wcb};
+ for my $git (delete @$self{grep(/\A$$\0/, keys %$self)}) {
+ $git->async_wait_all;
+ }
+ $SIG{__WARN__} = 'DEFAULT';
+}
+