1
0
mirror of https://github.com/danog/amp.git synced 2024-12-03 09:57:51 +01:00

Update docs

This commit is contained in:
Aaron Piotrowski 2020-04-16 10:01:53 -05:00
parent 5b4d019753
commit a062c3ed26
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB
2 changed files with 8 additions and 4 deletions

View File

@ -79,11 +79,13 @@ abstract class Driver
/**
* 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
* @see Driver::run()
*
* @see Driver::run()
*/
public function execute(callable $callback)
{

View File

@ -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
* 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 \Error If the event loop stopped without the $promise being resolved.