# operate in. This can be useful to ensure smaller inboxes can
# be cloned while cloning of large inboxes is maxed out.
#
# operate in. This can be useful to ensure smaller inboxes can
# be cloned while cloning of large inboxes is maxed out.
#
# other external scheduling mechanism, you just need to call
# start() and finish() appropriately. However, public-inbox-httpd
# (which uses PublicInbox::DS) will be able to schedule this
# other external scheduling mechanism, you just need to call
# start() and finish() appropriately. However, public-inbox-httpd
# (which uses PublicInbox::DS) will be able to schedule this
finish($self);
my ($fh, $qx_fh) = delete(@$self{qw(fh qx_fh)});
$fh->close if $fh; # async-only (psgi_return)
finish($self);
my ($fh, $qx_fh) = delete(@$self{qw(fh qx_fh)});
$fh->close if $fh; # async-only (psgi_return)
$ret = [ 500, [], [ "Internal error\n" ] ];
}
} else {
# caller should notify us when it's ready:
return if $! == EAGAIN;
next if $! == EINTR; # immediate retry
$ret = [ 500, [], [ "Internal error\n" ] ];
}
} else {
# caller should notify us when it's ready:
return if $! == EAGAIN;
next if $! == EINTR; # immediate retry