Skip to content

Commit 5725464

Browse files
committed
Dispatch coros to Python event loop thread
This rewrites the Asgi to dispatch each ASGI call coroutine to a separate Python event loop thread which will spin forever.
1 parent b1f0acc commit 5725464

File tree

4 files changed

+304
-270
lines changed

4 files changed

+304
-270
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ http-handler = { git = "ssh://git@github.com/platformatic/http-handler" }
2525
http-rewriter = { git = "ssh://git@github.com/platformatic/http-rewriter" }
2626
# http-rewriter = { path = "../http-rewriter" }
2727
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
28-
napi = { version = "3", default-features = false, features = ["napi4"], optional = true }
28+
napi = { version = "3", default-features = false, features = ["napi4", "tokio_rt", "async"], optional = true }
2929
napi-derive = { version = "3", optional = true }
3030
pyo3 = { version = "0.25.1", features = ["experimental-async"] }
3131
pyo3-async-runtimes = { version = "0.25.0", features = ["tokio-runtime"] }

0 commit comments

Comments
 (0)