use core::{fmt::Debug, time::Duration};
use super::{ListenerCreateError, ListenerWaitError, NotifierNotifyError};
pub mod semaphore;
pub trait SignalMechanism: Send + Sync + Debug {
fn new() -> Self;
unsafe fn init(&mut self) -> Result<(), ListenerCreateError>;
unsafe fn notify(&self) -> Result<(), NotifierNotifyError>;
unsafe fn try_wait(&self) -> Result<bool, ListenerWaitError>;
unsafe fn timed_wait(&self, timeout: Duration) -> Result<bool, ListenerWaitError>;
unsafe fn blocking_wait(&self) -> Result<(), ListenerWaitError>;
}