Skip to content

Commit

Permalink
Fix obsolete Promise reference in docs (#446)
Browse files Browse the repository at this point in the history
Changing references from Amp\Promise to Amp\Future for awaitAll, awaitFirst and awaitAny functions.
  • Loading branch information
gauthier-scano authored Nov 7, 2024
1 parent 138801f commit 7a72295
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,15 @@ individual keys in the component array are preserved from the `iterable` passed

##### awaitAll

`Amp\Promise\awaitAll($iterable, $cancellation)` awaits all futures and returns their results as `[$errors, $values]` array.
`Amp\Future\awaitAll($iterable, $cancellation)` awaits all futures and returns their results as `[$errors, $values]` array.

##### awaitFirst

`Amp\Promise\awaitFirst($iterable, $cancellation)` unwraps the first completed `Future`, whether successfully completed or errored.
`Amp\Future\awaitFirst($iterable, $cancellation)` unwraps the first completed `Future`, whether successfully completed or errored.

##### awaitAny

`Amp\Promise\awaitAny($iterable, $cancellation)` unwraps the first successfully completed `Future`.
`Amp\Future\awaitAny($iterable, $cancellation)` unwraps the first successfully completed `Future`.

#### Future Creation

Expand Down

0 comments on commit 7a72295

Please sign in to comment.