The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Continual::Process::Instance - one instance

SYNOPSIS

$instance = Continual::Process::Instance->new(
    name => 'job1',
    instance_id => 1,
    code => sub {
        ...
        return $pid;
    }
)->start();

while(1) {
    if (!$instance->is_alive()) {
        $instance->start();
    }
}

DESCRIPTION

This class represents one instance of Continual::Process

METHODS

new(%attributes)

%attributes

name

name of process

instance_id

id of instance (number)

code

CodeRef

start()

start this instance

is_alive()

is this instance alive?

LICENSE

Copyright (C) Avast Software.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Jan Seidl <seidl@avast.com>