Zend async Scheduler ABI#22561
Open
EdmondDantes wants to merge 1 commit into
Open
Conversation
EdmondDantes
marked this pull request as draft
July 2, 2026 17:48
EdmondDantes
force-pushed
the
async-core
branch
4 times, most recently
from
July 2, 2026 18:11
615d050 to
ed9fe03
Compare
EdmondDantes
force-pushed
the
async-core
branch
10 times, most recently
from
July 3, 2026 09:58
f3b272d to
6e1a5ce
Compare
bwoebi
reviewed
Jul 3, 2026
bwoebi
reviewed
Jul 3, 2026
bwoebi
reviewed
Jul 3, 2026
bwoebi
reviewed
Jul 3, 2026
EdmondDantes
force-pushed
the
async-core
branch
5 times, most recently
from
July 16, 2026 08:21
3286ac0 to
9e95fa1
Compare
EdmondDantes
force-pushed
the
async-core
branch
2 times, most recently
from
July 16, 2026 10:04
4f08e57 to
55fafc8
Compare
EdmondDantes
force-pushed
the
async-core
branch
7 times, most recently
from
July 23, 2026 05:01
93eb5a4 to
19c3a58
Compare
…ne 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.
EdmondDantes
force-pushed
the
async-core
branch
2 times, most recently
from
July 23, 2026 08:45
19c3a58 to
8f34764
Compare
EdmondDantes
marked this pull request as ready for review
July 23, 2026 09:08
EdmondDantes
requested review from
arnaud-lb,
dstogov and
kocsismate
as code owners
July 23, 2026 09:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A lightweight asynchronous core without complex logic.
The idea is:
https://github.com/true-async/php-async-core-rfc/blob/main/scheduler_rfc.md
A detailed explanation of the core integration can be found here:
https://github.com/true-async/php-async-core-rfc/blob/main/core-integration.md
At the moment, both the code and the RFC are still under development. I'd be happy to hear your ideas and feedback.