forked from EdmondDantes/php-true-async-rfc
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAsync.php
More file actions
49 lines (32 loc) · 1 KB
/
Copy pathAsync.php
File metadata and controls
49 lines (32 loc) · 1 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
<?php
declare(strict_types=1);
namespace Async;
/**
* Execute the provided closure in non-cancellable mode.
*/
function protect(\Closure $closure): void {}
function hiPriority(?Scope $scope = null): SpawnStrategy {}
function any(iterable $triggers): Awaitable {}
function all(iterable $triggers): Awaitable {}
function anyOf(int $count, iterable $triggers): Awaitable {}
function ignoreErrors(Awaitable $awaitable, callable $handler): Awaitable {}
function captureErrors(Awaitable $awaitable): Awaitable {}
function delay(int $ms): void {}
function timeout(int $ms): Awaitable {}
function currentContext(): Context {}
function coroutineContext(): Context {}
/**
* Returns the current coroutine.
*/
function currentCoroutine(): Coroutine {}
/**
* Returns the root Scope.
*/
function rootContext(): Context {}
/**
* Returns the list of all coroutines
*
* @return Coroutine[]
*/
function getCoroutines(): array {}
function gracefulShutdown(?CancellationException $cancellationException = null): void {}