Skip to content

fix(python): return a shared background executor - #8596

Merged
Xuanwo merged 1 commit into
mainfrom
xuanwo/fix-python-executor-shared-reference
Aug 18, 2026
Merged

fix(python): return a shared background executor#8596
Xuanwo merged 1 commit into
mainfrom
xuanwo/fix-python-executor-shared-reference

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

The process-wide background executor was exposed as a mutable static reference even though its API only requires shared access. Repeated callers could therefore obtain aliased &mut references to the same executor, violating Rust reference rules. Return a shared reference while preserving the singleton and fork-reinitialization behavior.

@github-actions github-actions Bot added A-python Python bindings bug Something isn't working labels Aug 17, 2026
@Xuanwo
Xuanwo marked this pull request as ready for review August 18, 2026 05:25
@Xuanwo

Xuanwo commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

EC2 performance validation

Tested head bad107cd00dfe3a2ac3f841d0e560713bb2cb8f1 against base f177fae7a93343aaab2f1992061756c28497e6ee on a dedicated AWS c7i.4xlarge (Intel Xeon Platinum 8488C), Amazon Linux 2023 x86_64, Rust 1.97.0. Criterion binaries were pinned to CPU 2 and measured in both orders.

The background-executor lookup measured 1.5315 ns at the PR head. The forward delta was -0.007% (95% CI: -0.091% to +0.063%); the reverse comparison was likewise centered at -0.005%. No performance change was detected, so no remediation is needed.

@Xuanwo
Xuanwo merged commit 53b7a23 into main Aug 18, 2026
17 of 18 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/fix-python-executor-shared-reference branch August 18, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-python Python bindings bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants