PrePAN

Sign in to PrePAN

Mojo::IOLoop::Signal Mojo::IOLoop based, non-blocking signal handler

Good

Synopsis

use Mojo::IOLoop::Signal;

Mojo::IOLoop::Signal->on(TERM => sub {
  my ($self, $name) = @_;
  warn "Got $name signal";
});

Mojo::IOLoop->start unless Mojo::IOLoop->is_running;

Description

Mojo::IOLoop::Signal is a Mojo::IOLoop based, non-blocking signal handler.

Questions:

  • Why does not Mojo::IOLoop officially support signals?
  • Do you think this module useful?
  • Any feedback is welcome.

Thanks.

Comments

Please sign up to post a review.