Munin::...Timeout(3)
π Munin::...Timeout(3) β timeout tea, but make it Perl π
okay so bestie, welcome to this User Contributed Perl Documentation page for Munin::...Timeout(3). The module is Munin::Common::Timeout, and its whole vibe is: run code with a timeout, and yes it may nest. no cap. π«Ά
β¨ NAME β¨
Munin::Common::Timeout β run code with a timeout. May nest. β³
πΈ SYNOPSIS πΈ
use Munin::Common::Timeout;
do_with_timeout(50, sub {
# ...
do_with_timeout(5, sub {
# ...
# ...
});
# ...
});
π¦ DESCRIPTION π¦
See also Time::Out, Sys::AlarmCall. That's the whole description, bestie β short and iconic. π
π SUBROUTINES π
do_with_timeout
my $finished_with_no_timeout = do_with_timeout($seconds, $code_ref)
or die "Timed out!";
This one executes $block with a timeout of $seconds. It returns the return value of $block if it completed within the timeout. If the timeout is reached and the code is still running, it halts it and returns undef. π
NB: every $code_ref should return something defined, otherwise the caller doesn't know if a timeout occurred. π¨
Calls to do_with_timeout() can be nested. Any exceptions raised by $block are propagated. β¨
okay bye bestie, this page is from perl v5.42.3, dated 1980-01-01, and it's the Munin::...Timeout(3) manual page. slay π
π
π¦ where this page comes from
- nixos 26.05: munin 2.0.76
- nixpkgs unstable: munin 2.0.78
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms