Repository navigation
Modernization 2 - #7
Merged
Merged
Conversation
… the world, existentialist things
…ed multi volume rendering finally!
transfix
added a commit
that referenced
this pull request
Sep 29, 2026
An adversarial review of register_async_coro found 8 issues. Fixes: - drive_coros: run_forever is now called ONLY when the call_later(budget) stop timer is armed (else it would never return), and a failed loop step FAILS every pending coroutine (posts an __async_error__) instead of clearing the error and spinning an unkillable pump. (#2, #5) - run() gains a re-entrancy guard: a registered fn/coro that calls back into run() now raises immediately instead of corrupting the shared scheduler + asyncio loop (one Exec is driven by one thread). (#4) - Coroutine Tasks are run-scoped: a RAII guard cancels + drops any left pending at every run() exit, so an orphaned coroutine of a sibling process can't suppress the NEXT run()'s idle timeout. (#6) - register_fn / register_async_fn reject an async def up front (use register_async_coro), so it can't be marshalled as an un-awaited-coroutine repr string. (#7) - Docs corrected: the coro slice is COOPERATIVE (asyncio can't preempt a running step), so a coroutine MUST yield — CPU/blocking work belongs in register_async_fn; a never-resolving await leaves run() waiting like a never-returning callable; and __async_error__ is a reserved result key. (#1, #3, #8) Tests: async-def-rejected-by-sync-and-pool-paths, reentrant-run-is-rejected (+ Exec stays usable). Full coro suite 7, exec 7, exec-async 5 green.
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.
No description provided.