Fix scheduler gather scaling and await wait protocol#345
Open
Fix scheduler gather scaling and await wait protocol#345
Conversation
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
current_interceptor_chain()stops rewalking common caller-chain suffixesWaitEffectpathCreateExternalPromise -> Wait -> Resumeprotocol and preserve cooperative sibling cancellation under Gather fail-fastVerification
uvx maturin develop --releaseuv run pytest tests/core/test_scheduler_transfer.py -q9 passed in 1.39suv run pytest tests/core/test_rust_vm_api_strict.py::test_default_handlers_are_module_sentinels_only tests/core/test_sa009_async_handler_spec_gaps.py::TestHandlerImmutabilityContract::test_spawned_child_preserves_full_default_handler_stack tests/effects/test_sync_await_spawn_gather_deadlock.py tests/test_cache_await_spawn_hang.py::TestCacheAwaitSpawnHang::test_no_cache_500_works -q9 passed in 5.81suv run python - <<'PY' ... N=500 Spawn+Await+Gather benchmark ... PYN=500 elapsed=3.943s ok=True len=500cargo check --features python_bridge --testspackages/doeff-vm-coreAcceptance Criteria
N=500 Spawn+Await(sleep(0.01))+Gathercompletes well under 10s:3.943sWaitnow avoids theGather(single)path, whileWaitMode::Anyremains O(1)Refs: scheduler-gather-quadratic