IPC::Concurrency::DBI::Application::Instance - Application instance that represents consumption of the limited resource.
Version 1.2.0
This module represents one instance of an application managed by IPC::Concurrency::DBI.
See the documentation of IPC::Concurrency::DBI for more information.
my $instance = $concurrent_program->start_instance(); unless ( defined( $instance ) ) { print "Too many instances of $0 are already running.\n"; exit; } # [...] Do some work. # Now that the application is about to exit, flag the instance as completed. # (note: this is implicit when $instance is destroyed). $instance->finish();
Create a new IPC::Concurrency::DBI::Application::Instance object.
This function should not be called directly and its API could change, instead use IPC::Concurrency::DBI::Application::start_instance().
# Retrieve the application by name. my $instance = IPC::Concurrency::DBI::Application::Instance->new( application => $application, );
'application': mandatory, an IPC::Concurrency::DBI::Application object.
Declare that the current instance has finished running and free the slot for a new instance.
Returns the parent IPC::Concurrency::DBI::Application object.
my $application = $instance->get_application();
Automatically clear the slot used by the current instance when the object is destroyed, if finish() has not been called already.
Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/IPC-Concurrency-DBI/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc IPC::Concurrency::DBI
You can also look for information at:
GitHub's request tracker
https://github.com/guillaumeaubert/IPC-Concurrency-DBI/issues
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/IPC-Concurrency-DBI
CPAN Ratings
http://cpanratings.perl.org/d/IPC-Concurrency-DBI
MetaCPAN
https://metacpan.org/release/IPC-Concurrency-DBI
Guillaume Aubert, <aubertg at cpan.org>.
<aubertg at cpan.org>
Copyright 2011-2017 Guillaume Aubert.
This code is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for more details.
To install IPC::Concurrency::DBI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IPC::Concurrency::DBI
CPAN shell
perl -MCPAN -e shell install IPC::Concurrency::DBI
For more information on module installation, please visit the detailed CPAN module installation guide.