Lines Matching refs:wait
10 - [Synchronous wait](#synchronous-wait)
25 - Promises have a synchronous `wait` method.
213 You can synchronously force promises to complete using a promise's `wait`
214 method. When creating a promise, you can provide a wait function that is used
215 to synchronously force a promise to complete. When a wait function is invoked
217 wait function does not deliver a value, then an exception is thrown. The wait
218 function provided to a promise constructor is invoked when the `wait` function
226 // Calling wait will return the value of the promise.
227 echo $promise->wait(); // outputs "foo"
230 If an exception is encountered while invoking the wait function of a promise,
238 $promise->wait(); // throws the exception.
241 Calling `wait` on a promise that has been fulfilled will not trigger the wait
247 echo $promise->wait(); // outputs "foo"
250 Calling `wait` on a promise that has been rejected will throw an exception. If
258 $promise->wait();
272 by passing `false` to the first argument of the `wait` function:
279 $promise->wait(false);
285 wait function will be the value delivered to promise B.
321 assert('waited' === $promise->wait());
334 - `wait($unwrap = true) : mixed`
418 Please note that wait and cancel chaining is no longer possible when forwarding
420 promise in order to utilize wait and cancel functions with foreign promises.
474 var_dump($p->wait()); // int(1000)