NAME

App::Koyomi::Semaphore - koyomi semaphore

SYNOPSIS

use App::Koyomi::Semaphore;
if (App::Koyomi::Semaphore->consume(%args)) {
    # Succeeded to consume semaphore
} else {
    # Failed to consume semaphore
}

DESCRIPTION

This module represents semaphore for exclusive job execution.

METHODS

consume

Try to consume semaphore. Return true when successful.

AUTHORS

IKEDA Kiyoshi <progrhyme@gmail.com>

LICENSE

Copyright (C) 2015-2017 IKEDA Kiyoshi.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. That means either (a) the GNU General Public License or (b) the Artistic License.