Repository navigation
Construct server engines on their owner worker - #2111
Merged
Merged
Conversation
Pass a Send-safe load closure into each worker and wait for a typed readiness handshake, so Engine construction, execution, failure unwind, and destruction all stay on the owner OS thread. Remove EngineOwner and forbid unsafe code in the server while preserving the single-worker routing and shutdown contracts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2111 +/- ##
==========================================
+ Coverage 80.30% 81.14% +0.84%
==========================================
Files 426 429 +3
Lines 205244 215150 +9906
Branches 205244 215150 +9906
==========================================
+ Hits 164811 174578 +9767
- Misses 34781 34797 +16
- Partials 5652 5775 +123
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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
Engineinside its single owner worker and return a typed readiness resultEngineOwnerand forbid unsafe code in the server crateScope
This is the owner-thread lifecycle prerequisite only. It preserves the #2056 global lease/session routing and #2044 state split.
W = 1; this PR makes no concurrency, parallel execution, or batching claim.Tests
cargo test -p onnx-genai-server --lib(319 passed, 2 ignored)cargo test -p onnx-genai-server --test http(40 passed, 1 ignored)cargo test -p onnx-genai-server --lib session(50 passed)cargo test -p onnx-genai-server --lib unload(7 passed)cargo fmt --all -- --checkcargo clippy -p onnx-genai-server --all-targets -- -D warnings