Name : perl-AnyEvent-Promise
| |
Version : 0.02
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.4.1
| Date : 2023-01-27 17:41:48
|
Group : Development/Libraries/Perl
| Source RPM : perl-AnyEvent-Promise-0.02-lp154.4.1.src.rpm
|
Size : 0.01 MB
| |
Packager : https://www_suse_com/
| |
Summary : Evented promises
|
Description :
AnyEvent::Promise allows evented interfaces to be chained, taking away some of the redundancy of layering AnyEvent condition variable callbacks.
A promise is created using AnyEvent::Promise::new or the exported promise helper function. These will both return a promise instance and add the callback function as the start of the promise chain. Each call to then on the promise instance will add another subroutine which returns a condition variable to the chain.
The promise callback chain won\'t start until condvar or fulfill is called on the instance. Calling condvar or cv will start the callback chain and return the promise guarding condvar, which is fulfilled after the last callback on the chain returns. Similarily, fulfill will start the chain, but will block until the guarding condvar is fulfilled.
Errors in the callbacks can be caught by setting an exception handler via the catch method on the promise instance. This method will catch exceptions raised from AnyEvent objects and exceptions raised in blocks provided to then. If an error is encountered in the chain, an exception will be thrown and the rest of the chain will be skipped, jumping straight to the catch callback.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-A/15.4/noarch |