forked from EdmondDantes/php-true-async-rfc
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathScope.php
More file actions
59 lines (39 loc) · 1.76 KB
/
Copy pathScope.php
File metadata and controls
59 lines (39 loc) · 1.76 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
declare(strict_types=1);
namespace Async;
final class Scope implements ScopeProvider
{
public readonly Context $context;
/**
* Creates a new Scope that inherits from the specified one. If the parameter is not provided,
* the Scope inherits from the current one.
*
* @param Scope|null $parentScope
*
* @return Scope
*/
public static function inherit(?Scope $parentScope = null): Scope {}
#[\Override] public function provideScope(): Scope {}
public function __construct() {}
public function asNotSafely(): Scope {}
public function spawn(\Closure $callable, ...$params): Coroutine {}
public function cancel(?CancellationException $cancellationException = null): void {}
public function awaitCompletion(Awaitable $cancellation): void {}
public function awaitAfterCancellation(?callable $errorHandler = null, ?Awaitable $cancellation = null): void {}
public function isFinished(): bool {}
public function isClosed(): bool {}
/**
* Sets an error handler that is called when an exception is passed to the Scope from one of its child coroutines.
*/
public function setExceptionHandler(callable $exceptionHandler): void {}
/**
* Exception handler for child Scope.
* Setting this handler prevents the exception from propagating to the current Scope.
*/
public function setChildScopeExceptionHandler(callable $exceptionHandler): void {}
public function onFinally(\Closure $callback): void {}
public function dispose(): void {}
public function disposeSafely(): void {}
public function disposeAfterTimeout(int $timeout): void {}
public function getChildScopes(): array {}
}