Skip to content

Commit

Permalink
chore(async): remove await_* functions
Browse files Browse the repository at this point in the history
Signed-off-by: azjezz <azjezz@protonmail.com>
  • Loading branch information
azjezz committed Dec 8, 2021
1 parent 60ba187 commit a40b917
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 361 deletions.
125 changes: 99 additions & 26 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions docs/component/async.md
Expand Up @@ -12,21 +12,17 @@

#### `Functions`

- [all](./../../src/Psl/Async/all.php#L26)
- [all](./../../src/Psl/Async/all.php#L22)
- [any](./../../src/Psl/Async/any.php#L25)
- [await](./../../src/Psl/Async/await.php#L18)
- [await_readable](./../../src/Psl/Async/await_readable.php#L23)
- [await_signal](./../../src/Psl/Async/await_signal.php#L18)
- [await_writable](./../../src/Psl/Async/await_writable.php#L21)
- [first](./../../src/Psl/Async/first.php#L22)
- [later](./../../src/Psl/Async/later.php#L14)
- [main](./../../src/Psl/Async/main.php#L16)
- [parallel](./../../src/Psl/Async/parallel.php#L64)
- [parallel](./../../src/Psl/Async/parallel.php#L21)
- [reflect](./../../src/Psl/Async/reflect.php#L25)
- [run](./../../src/Psl/Async/run.php#L20)
- [series](./../../src/Psl/Async/series.php#L21)
- [sleep](./../../src/Psl/Async/sleep.php#L10)
- [wrap](./../../src/Psl/Async/wrap.php#L21)

#### `Classes`

Expand Down
10 changes: 3 additions & 7 deletions src/Psl/Async/all.php
Expand Up @@ -10,18 +10,14 @@
/**
* Awaits all awaitables to complete concurrently.
*
* If one awaitable fails, the exception will be thrown immediately, and the result of the callables will be ignored.
*
* If multiple awaitables failed at once, a {@see Exception\CompositeException} will be thrown.
*
* Once the awaitables have completed, an array containing the results will be returned preserving the original awaitables order.
*
* @template Tk of array-key
* @template Tv
*
* @param iterable<Tk, Awaitable<Tv>> $awaitables
*
* @return array<Tk, Tv> Unwrapped values with the order preserved.
* @throws Exception\CompositeException If multiple awaitables failed at once.
*
* @return array<Tk, Tv> an array containing the results, preserving the original awaitables order.
*/
function all(iterable $awaitables): array
{
Expand Down
62 changes: 0 additions & 62 deletions src/Psl/Async/await_readable.php

This file was deleted.

47 changes: 0 additions & 47 deletions src/Psl/Async/await_signal.php

This file was deleted.

0 comments on commit a40b917

Please sign in to comment.