`no_std` support for `PyMutex`
Author: Person-93Created Sep 19, 2026Updated Sep 21, 2026
Labelsno_std
PyMutex is a poisoning mutex. That means it has to check at runtime if the current thread is panicking. There is no way to do this in no_std. The current implementation of PyMutex cannot be supported without std.
I think we should add a non-poisoning variant, update the critical section API to accept either variant, and feature-gate the poisoning variant.
Source: PyO3/pyo3