Conversation
Track active contexts per engine, refresh the QuickJS stack boundary, block unsafe Fiber switches, apply callback timeouts, and bound nested values. Flush dropped callback references at each outer entry and test recovery.
Expose hasPendingJobs and runJobs for host event loops. Enforce per-batch job and wall-time budgets, reject isolated or reentrant pumping, and cover Promise resolution, callback cleanup, timeouts, and Fiber resumption.
Convert callback arguments and queued guest messages natively. Bound queue size, reject non-data payloads, discard partial messages on failure, and return job progress to the host for asynchronous scheduling.
Build and test with PHP 8.5 and Rust 1.96.1 using a bind-mounted checkout. Keep Cargo and Composer caches in .cache and install integration-test dependencies in CI.
Automatically await eval and saved callback results using QuickJS Promise state. Preserve Fiber ownership, queue foreign callback calls with their results and errors, and wake external waits at the execution deadline. Share native callback conversion and cover Revolt/Amp flows with regression tests.
xtrime-ru
force-pushed
the
async-jobs-fibers
branch
from
September 30, 2026 09:18
bed28d8 to
ecb3eb6
Compare
xtrime-ru
force-pushed
the
async-jobs-fibers
branch
from
September 30, 2026 09:26
ecb3eb6 to
c9159b6
Compare
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.
Summary
hasPendingJobs()andexecutePendingJobs()) and support awaiting Promises through PHP Fibers, Revolt, and Amphp v3.quickjs.postMessage(value)andQuickJS::drainMessages()for data-only messages with snapshot semantics and a configurable queue limit.Validation