Commit 14af3cb
committed
async: coroutine engine core, the reference scheduler and the coroutine context
The Async Core ABI (zend_async_API.h): coroutines with a packed lifecycle,
scheduler slots (launch, enqueue-with-error, suspend, cancel, await),
switch/finish handler vectors, the awaiting-info vector, microtasks, and
the coroutine context — an embedded internal store for C extensions
(process-unique numeric keys) plus the userland zend_async_context_t
storage behind a provider-registered class. Fibers run as coroutines under
a scheduler; gc_collect_cycles() stays synchronous over a GC coroutine;
shutdown drains coroutines gracefully; exit() in a fiber raises the
shutdown notification.
ext/test_scheduler validates the ABI in-tree: the C reference provider,
gated by test_scheduler.enable. The PHP registration bridge lives out of
tree (ext-scheduler-hook) and talks to the core through ZEND_API only.
Upstream suites stay byte-for-byte and run schedulerless; the
scheduler-adapted duplicates and the provider suite opt in.1 parent 28dab5f commit 14af3cb
81 files changed
Lines changed: 7282 additions & 68 deletions
File tree
- Zend
- tests/fibers
- ext/test_scheduler
- tests
- main
- win32/build
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
831 | 832 | | |
832 | 833 | | |
833 | 834 | | |
| 835 | + | |
834 | 836 | | |
835 | 837 | | |
836 | 838 | | |
| |||
1979 | 1981 | | |
1980 | 1982 | | |
1981 | 1983 | | |
| 1984 | + | |
1982 | 1985 | | |
1983 | | - | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
1984 | 1991 | | |
1985 | 1992 | | |
1986 | 1993 | | |
| |||
0 commit comments