mirror of
https://github.com/danog/amp.git
synced 2024-12-04 02:17:54 +01:00
Update docs
This commit is contained in:
parent
5b4d019753
commit
a062c3ed26
@ -79,11 +79,13 @@ abstract class Driver
|
|||||||
/**
|
/**
|
||||||
* Run the event loop with an explicit stop handle.
|
* Run the event loop with an explicit stop handle.
|
||||||
*
|
*
|
||||||
* This method is intended for Amp\Promise\wait only and NOT exposed as method in Amp\Loop.
|
* This method is intended for {@see \Amp\Promise\wait()} only and NOT exposed as method in {@see \Amp\Loop}.
|
||||||
|
*
|
||||||
|
* @param callable $callback Callback is given a callable as the only parameter that is used to stop the event loop.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @see Driver::run()
|
|
||||||
*
|
*
|
||||||
|
* @see Driver::run()
|
||||||
*/
|
*/
|
||||||
public function execute(callable $callback)
|
public function execute(callable $callback)
|
||||||
{
|
{
|
||||||
|
@ -175,9 +175,11 @@ namespace Amp\Promise
|
|||||||
* Use this function only in synchronous contexts to wait for an asynchronous operation. Use coroutines and yield to
|
* Use this function only in synchronous contexts to wait for an asynchronous operation. Use coroutines and yield to
|
||||||
* await promise resolution in a fully asynchronous application instead.
|
* await promise resolution in a fully asynchronous application instead.
|
||||||
*
|
*
|
||||||
* @param Promise|ReactPromise $promise Promise to wait for.
|
* @template TReturn
|
||||||
*
|
*
|
||||||
* @return mixed Promise success value.
|
* @param Promise<TReturn>|ReactPromise $promise Promise to wait for.
|
||||||
|
*
|
||||||
|
* @return TReturn Promise success value.
|
||||||
*
|
*
|
||||||
* @throws \TypeError If $promise is not an instance of \Amp\Promise or \React\Promise\PromiseInterface.
|
* @throws \TypeError If $promise is not an instance of \Amp\Promise or \React\Promise\PromiseInterface.
|
||||||
* @throws \Error If the event loop stopped without the $promise being resolved.
|
* @throws \Error If the event loop stopped without the $promise being resolved.
|
||||||
|
Loading…
Reference in New Issue
Block a user