Skip to content

fix: review ASGI protocol bridge (run_coroutine_threadsafe) under load #17

Description

@ZhuchkaTriplesix

Context

  • oxyroute/asgi.py uses asyncio.run_coroutine_threadsafe and blocking fut.result() from sync response_* when native code calls into Python from a Tokio worker. Risk of deadlock under mixed load is documented; needs hardening.

Work

  • Reproduce with concurrent httpx requests. If deadlock appears, use a one-shot asyncio.Queue in the ASGI task to receive response actions without cross-thread result(), or an anyio / trio bridge.

Acceptance criteria

  • Stress test: 50 concurrent requests without hang; optional uvicorn subprocess smoke test.

Activity

  1. added this to the v0.2.0 milestone on Apr 26, 2026
  2. linked a pull request that will close this issueDev #45on Apr 26, 2026
  3. ZhuchkaTriplesix commented on Apr 26, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Reopened after backlog review (2026-04-26): implementation is partial or the topic remains active (see .github/ISSUE_BACKLOG/bodies/017.md and PRIORITIES.md).

  4. ZhuchkaTriplesix commented on Apr 26, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Note: body file is .github/ISSUE_BACKLOG/bodies/17.md (not 017).

  5. linked a pull request that will close this issuerelease: v0.2.0 hardening from dev #69on Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingresearch

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions