Fork::Promise - run a code in a subprocess and get a promise that it ended
use Fork::Promise; use AnyEvent; my $pp = Fork::Promise->new(); my $condvar = AnyEvent->condvar; my $promise = $pp->run(sub { sleep 1 });
Fork::Promise implements only one method - run. It runs given code in a subprocess and registers AnyEvent child watcher which resolves promise returned by run method.
Copyright (C) Avast Software.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Miroslav Tynovsky <tynovsky@avast.com>
To install Fork::Promise, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fork::Promise
CPAN shell
perl -MCPAN -e shell install Fork::Promise
For more information on module installation, please visit the detailed CPAN module installation guide.