Coro::Timer man page on Pidora

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

Timer(3)	      User Contributed Perl Documentation	      Timer(3)

NAME
       Coro::Timer - timers and timeouts, independent of any event loop

SYNOPSIS
	# This package is mostly obsoleted by Coro::AnyEvent.

	use Coro::Timer qw(timeout);
	# nothing exported by default

DESCRIPTION
       This package has been mostly obsoleted by Coro::AnyEvent, the only
       really useful function left in here is "timeout".

       $flag = timeout $seconds
	   This function will wake up the current coroutine after $seconds
	   seconds and sets $flag to true (it is false initially).  If $flag
	   goes out of scope earlier then nothing happens.

	   This is used by Coro itself to implement the "timed_down",
	   "timed_wait" etc. primitives. It is used like this:

	      sub timed_wait {
		 my $timeout = Coro::Timer::timeout 60;

		 while (condition false) {
		    Coro::schedule; # wait until woken up or timeout
		    return 0 if $timeout; # timed out
		 }

		 return 1; # condition satisfied
	      }

AUTHOR
	Marc Lehmann <schmorp@schmorp.de>
	http://home.schmorp.de/

perl v5.14.2			  2011-11-11			      Timer(3)
[top]

List of man pages available for Pidora

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