From fcffbc8f307972b928f38f6a13da5ee671172b9e Mon Sep 17 00:00:00 2001 From: Zhuk Sergey Date: Tue, 19 Sep 2017 11:36:15 +0300 Subject: [PATCH 1/2] fixes typo in docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba02505..2feaece 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ try { $value = Block\await($promise, $loop); // promise successfully fulfilled with $value echo 'Result: ' . $value; -} catch (Exeption $exception) { +} catch (Exception $exception) { // promise rejected with $exception echo 'ERROR: ' . $exception->getMessage(); } From 02ca81b9d19411a1643e10e3238b3feaf89771f7 Mon Sep 17 00:00:00 2001 From: Zhuk Sergey Date: Wed, 20 Sep 2017 15:20:38 +0300 Subject: [PATCH 2/2] fixes the description for awaitAny() function --- README.md | 2 +- src/functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2feaece..802430b 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ remaining promises and return whatever the first promise resolves to. If ALL promises fail to resolve, this will fail and throw an `Exception`. If no $timeout is given and either promise stays pending, then this will -potentially wait/block forever until the last promise is settled. +potentially wait/block forever until the first promise is settled. If a $timeout is given and either promise is still pending once the timeout triggers, this will `cancel()` all pending promises and throw a `TimeoutException`. diff --git a/src/functions.php b/src/functions.php index 2c59183..65c54be 100644 --- a/src/functions.php +++ b/src/functions.php @@ -104,7 +104,7 @@ function ($error) use (&$exception, &$rejected, &$wait, $loop) { * If ALL promises fail to resolve, this will fail and throw an Exception. * * If no $timeout is given and either promise stays pending, then this will - * potentially wait/block forever until the last promise is settled. + * potentially wait/block forever until the first promise is settled. * * If a $timeout is given and either promise is still pending once the timeout * triggers, this will cancel() all pending promises and throw a `TimeoutException`.