embassy-sync 0.8.0

no-std, no-alloc synchronization primitives with async support
Documentation
1
2
3
4
5
6
use embassy_sync::once_lock::OnceLock;

// *mut u8 is not Sync, so OnceLock should not implement Sync for this type. This should fail to compile.
static GLOBAL: OnceLock<*mut u8> = OnceLock::new();

fn main() {}