mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-24 10:59:34 +01:00
Fix Default
for rtic_sync::signal
This commit is contained in:
parent
8871c85022
commit
07b460fc0f
1 changed files with 6 additions and 1 deletions
|
@ -12,12 +12,17 @@ enum Store<T> {
|
|||
}
|
||||
|
||||
/// A "latest only" value store with unlimited writers and async waiting.
|
||||
#[derive(Default)]
|
||||
pub struct Signal<T: Copy> {
|
||||
waker: CriticalSectionWakerRegistration,
|
||||
store: UnsafeCell<Store<T>>,
|
||||
}
|
||||
|
||||
impl<T: Copy> Default for Signal<T> {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<T: Copy> Send for Signal<T> {}
|
||||
unsafe impl<T: Copy> Sync for Signal<T> {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue