ZeroMQ::Poller::Timer

Simple timer for use with ZeroMQ::Poller
Download

ZeroMQ::Poller::Timer Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • James Conerly
  • Publisher web site:
  • http://search.cpan.org/~jconerly/

ZeroMQ::Poller::Timer Tags


ZeroMQ::Poller::Timer Description

ZeroMQ::Poller is a Perl module that waits on ZeroMQ sockets for events, and if you're writing a daemon you would usually have it do this in an infinite loop. However, if nothing is happening on those sockets then ZeroMQ::Poller just blocks on it's poll() method indefinitely. Daemons might periodically want to do things, like reload configuration files, talk to databases, or process jobs that didn't succeed the first time.Currently, ZeroMQ::Poller has no built in functionality to let you periodically break out of the the poll() and do work. So this is my attempt at adding periodic timer functionality to ZeroMQ::Poller, using ZeroMQ.ZeroMQ::Poller::Timer is a simple, AnyEvent-like timer for use with ZeroMQ::Poller. Like an AnyEvent timer you can set each timer to fire off once, or at intervals. It currently does not support a callback feature, and might never. The timer is simply a way to make it possible to periodically break out of the blocking call to poll() so you can do other daemony stuff.SYNOPSIS use ZeroMQ::Poller::Timer; my $timer = ZeroMQ::Poller::Timer->new( name => 'my_timer', # Required after => $seconds, # Required interval => $seconds, pause => , # Defaults to 0 );Product's homepage


ZeroMQ::Poller::Timer Related Software