Asynchronous evaluation of Perl code (with optional timeouts)
Async executes some code in a separate process and retrieves the result. Since the code is running in a separate process, your main program can continue with whatever it was doing while the separate code is executing. This separate code is called an `asynchronous computation'. When your program wants to check to see if the asynchronous computation is complete, it can call the ready() method, which returns true if so, and false if it is still running.
After the asynchronous computation is complete, you should call the error() method to make sure that everything went all right. error() will return undef if the computation completed normally, and an error message otherwise.
Data returned by the computation can be retrieved with the result() method. The data must be a single string; any non-string value returned by the computation will be stringized. (See AsyncData below for how to avoid this.) If the computation has not completed yet, result() will return an undefined value.
result() takes an optional parameter, $force. If $force is true, then the calling process will wait until the asynchronous computation is complete before returning.
- Sources inherited from project devel:languages:perl
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout home:Tomcat42/perl-Async && cd $_
- Create Badge
Source Files
Filename | Size | Changed |
---|---|---|
Async-0.14.tar.gz | 0000010426 10.2 KB | |
cpanspec.yml | 0000000917 917 Bytes | |
perl-Async.changes | 0000000896 896 Bytes | |
perl-Async.spec | 0000001753 1.71 KB |
Latest Revision
- updated to 0.14 see /usr/share/doc/packages/perl-Async/Changes
Comments 0