|
Apache/2.4.41 (Ubuntu) Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) server ip : 62.171.164.128 | your ip : 127.0.0.1 safemode OFF > / home / a / home / dev2.destoffenstraat.com / vendor / ezimuel / ringphp / src / Future / |
Filename | /home/a/home/dev2.destoffenstraat.com/vendor/ezimuel/ringphp/src/Future/FutureInterface.php |
Size | 1.42 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 21-Aug-2025 12:26 |
Last modified | 07-Dec-2022 12:28 |
Last accessed | 22-Aug-2025 13:54 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
namespace GuzzleHttp\Ring\Future;
use React\Promise\PromiseInterface;
use React\Promise\PromisorInterface;
/**
* Represents the result of a computation that may not have completed yet.
*
* You can use the future in a blocking manner using the wait() function, or
* you can use a promise from the future to receive the result when the future
* has been resolved.
*
* When the future is dereferenced using wait(), the result of the computation
* is cached and returned for subsequent calls to wait(). If the result of the
* computation has not yet completed when wait() is called, the call to wait()
* will block until the future has completed.
*/
interface FutureInterface extends PromiseInterface, PromisorInterface
{
/**
* Returns the result of the future either from cache or by blocking until
* it is complete.
*
* This method must block until the future has a result or is cancelled.
* Throwing an exception in the wait() method will mark the future as
* realized and will throw the exception each time wait() is called.
* Throwing an instance of GuzzleHttp\Ring\CancelledException will mark
* the future as realized, will not throw immediately, but will throw the
* exception if the future's wait() method is called again.
*
* @return mixed
*/
public function wait();
/**
* Cancels the future, if possible.
*/
public function cancel();
}
namespace GuzzleHttp\Ring\Future;
use React\Promise\PromiseInterface;
use React\Promise\PromisorInterface;
/**
* Represents the result of a computation that may not have completed yet.
*
* You can use the future in a blocking manner using the wait() function, or
* you can use a promise from the future to receive the result when the future
* has been resolved.
*
* When the future is dereferenced using wait(), the result of the computation
* is cached and returned for subsequent calls to wait(). If the result of the
* computation has not yet completed when wait() is called, the call to wait()
* will block until the future has completed.
*/
interface FutureInterface extends PromiseInterface, PromisorInterface
{
/**
* Returns the result of the future either from cache or by blocking until
* it is complete.
*
* This method must block until the future has a result or is cancelled.
* Throwing an exception in the wait() method will mark the future as
* realized and will throw the exception each time wait() is called.
* Throwing an instance of GuzzleHttp\Ring\CancelledException will mark
* the future as realized, will not throw immediately, but will throw the
* exception if the future's wait() method is called again.
*
* @return mixed
*/
public function wait();
/**
* Cancels the future, if possible.
*/
public function cancel();
}