Munin::Common::Timeout man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

Munin::Common::TimeoutUser Contributed Perl DocumentaMunin::Common::Timeout(3)

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

SUBROUTINES
       do_with_timeout
	    my $finished_with_no_timeout = do_with_timeout($seconds, $code_ref)
		or die "Timed out!";

	   Executes $block with a timeout of $seconds.	Returns the return
	   value of the $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.

perl v5.20.3			  2015-11-05	     Munin::Common::Timeout(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net