[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 namespace GuzzleHttp\Ring\Future; 3 4 use React\Promise\PromiseInterface; 5 use React\Promise\PromisorInterface; 6 7 /** 8 * Represents the result of a computation that may not have completed yet. 9 * 10 * You can use the future in a blocking manner using the wait() function, or 11 * you can use a promise from the future to receive the result when the future 12 * has been resolved. 13 * 14 * When the future is dereferenced using wait(), the result of the computation 15 * is cached and returned for subsequent calls to wait(). If the result of the 16 * computation has not yet completed when wait() is called, the call to wait() 17 * will block until the future has completed. 18 */ 19 interface FutureInterface extends PromiseInterface, PromisorInterface 20 { 21 /** 22 * Returns the result of the future either from cache or by blocking until 23 * it is complete. 24 * 25 * This method must block until the future has a result or is cancelled. 26 * Throwing an exception in the wait() method will mark the future as 27 * realized and will throw the exception each time wait() is called. 28 * Throwing an instance of GuzzleHttp\Ring\CancelledException will mark 29 * the future as realized, will not throw immediately, but will throw the 30 * exception if the future's wait() method is called again. 31 * 32 * @return mixed 33 */ 34 public function wait(); 35 36 /** 37 * Cancels the future, if possible. 38 */ 39 public function cancel(); 40 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |