Skip to content

Commit 141ac2a

Browse files
Make promises usage more explicit
Current async example makes assumption that the promise will be resolved somewhere in the code later, but for newbies to this concept it's not clear.
1 parent 061b4a2 commit 141ac2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ $promise->then(
298298
);
299299

300300
echo "I will print out before the promise is fulfilled";
301+
302+
// You can combine multiple promises using \GuzzleHttp\Promise\all() and other functions from the library.
303+
$promise->wait();
301304
```
302305

303306
## Handling Exceptions

0 commit comments

Comments
 (0)