-
Notifications
You must be signed in to change notification settings - Fork 118
Closed
Description
We currently don't provide sync
module in no_std, as it requires OS-level support for blocking. What lazy_static does in this case is that it has a spin
feature, which replaces locking with spinning.
I think just silently replacing OS mutexes with busy waiting is the wrong approach, this is an important distinction which should be reflected in the type system.
So, we should instead add an opt-in spin
module, which has the same API as sync
, but is based on the spin
crate. That is, with both std
and spin
features enabled, the user should be able to use both once_cell::sync
and once_cell::spin
.
jplatte, antonok-edm and artobGrayJack, richardanaya, DrSensor, briansmith, josephlr and 7 more
Metadata
Metadata
Assignees
Labels
No labels