Skip to content

internal: no std mutex - #6058

Merged
davidhewitt merged 29 commits into
PyO3:mainfrom
Person-93:no_std_mutex
Aug 30, 2026
Merged

internal: no std mutex#6058
davidhewitt merged 29 commits into
PyO3:mainfrom
Person-93:no_std_mutex

Conversation

@Person-93

Copy link
Copy Markdown
Contributor

This PR is to prepare for no_std support.

I've added non_poison::Mutex and Once to the platform mod.

There was once place that relied on poisoning for correctness: err_state.rs, but that didn't really need a mutex because it was guarding a Copy type, I've replaced it with a Cell.

@Person-93
Person-93 force-pushed the no_std_mutex branch 2 times, most recently from b7b3dae to 7d53f79 Compare May 18, 2026 23:54
@Person-93
Person-93 marked this pull request as draft May 18, 2026 23:55
@Person-93
Person-93 force-pushed the no_std_mutex branch 2 times, most recently from 9bb808d to 465c958 Compare May 19, 2026 00:15
@codspeed-hq

codspeed-hq Bot commented May 19, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 10.54%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 140 untouched benchmarks
⏩ 6 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation test_empty_class_init 31.7 µs 28.7 µs +10.54%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Person-93:no_std_mutex (f057746) with main (58d00a1)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Person-93
Person-93 marked this pull request as ready for review May 19, 2026 01:22
@Person-93
Person-93 force-pushed the no_std_mutex branch 2 times, most recently from e393415 to 2988f07 Compare May 19, 2026 01:54
@Person-93 Person-93 changed the title No std mutex internal: no std mutex May 24, 2026
@Person-93
Person-93 force-pushed the no_std_mutex branch 3 times, most recently from acf2af4 to 9dec55b Compare May 26, 2026 19:23
Comment thread src/platform/sync.rs Outdated
@Person-93
Person-93 force-pushed the no_std_mutex branch 5 times, most recently from d5c4af8 to 2e08460 Compare June 15, 2026 21:16
@Person-93
Person-93 requested a review from davidhewitt June 18, 2026 17:24
@Person-93
Person-93 marked this pull request as draft June 22, 2026 18:59
@Person-93

Copy link
Copy Markdown
Contributor Author

I've moved the wip_std_feature into a separate PR and this one is blocked on that one. #6155

@Person-93
Person-93 marked this pull request as ready for review July 27, 2026 01:45
@Person-93
Person-93 force-pushed the no_std_mutex branch 2 times, most recently from 7307675 to ecf8705 Compare July 30, 2026 01:31
@davidhewitt
davidhewitt added this pull request to the merge queue Aug 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Aug 29, 2026
@davidhewitt
davidhewitt enabled auto-merge August 30, 2026 20:16
@davidhewitt
davidhewitt added this pull request to the merge queue Aug 30, 2026
Merged via the queue into PyO3:main with commit d44dcca Aug 30, 2026
51 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants