event-listener/examples
John Nunley a113f4596c feat: Add critical-section based implementation
The current no-std implementation is somewhat ineffecient, potentially
broken and relies on some slow data structures. The main reason why we
use this implementation is because we don't have a way to "lock" the
linked list, since there's no way to lock things in no-std. However,
many embedded platforms have a concept of a "critical section" that can
be used to exclusively lock something.

This PR adds an option to the "std" implementation that replaces the
existing Mutex with a usage of the critical-section crate. This is
enabled with the "critical-section" feature. This allows us to have the
advantages of the std-based implementation without needing to rely on
std for platforms that don't have it.

Signed-off-by: John Nunley <dev@notgull.net>
2024-12-04 08:17:27 -08:00
..
mutex.rs feat: Add critical-section based implementation 2024-12-04 08:17:27 -08:00