forked from EdmondDantes/php-true-async-rfc
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTaskGroup.php
More file actions
43 lines (30 loc) · 1.25 KB
/
Copy pathTaskGroup.php
File metadata and controls
43 lines (30 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
declare(strict_types=1);
namespace Async;
final class TaskGroup implements Awaitable, ScopeProvider, SpawnStrategy
{
public function __construct(
private ?Scope $scope = null,
private bool $captureResults = false,
private bool $bounded = false,
) {}
public function all(bool $ignoreErrors = false, $nullOnFail = false): Awaitable {}
public function race(bool $ignoreErrors = false): Awaitable {}
public function firstResult(bool $ignoreErrors = false): Awaitable {}
public function getResults(): array {}
public function getErrors(): array {}
#[\Override] public function provideScope(): ?Scope {}
#[\Override]
public function afterCoroutineEnqueue(Coroutine $coroutine, Scope $scope): void {}
#[\Override]
public function beforeCoroutineEnqueue(Coroutine $coroutine, Scope $scope): array {}
/**
* Cancel a task group.
*/
public function cancel(CancellationException $cancellationException): void {}
public function disposeResults(): void {}
public function dispose(): void {}
public function isFinished(): bool {}
public function isClosed(): bool {}
public function onFinally(\Closure $callback): void {}
}