#[derive(Debug, Clone)]
pub struct CanContinue(Arc<AtomicBool>);
impl CanContinue
{
#[inline(always)]
fn newCanContinue() -> Self
{
CanContinue(Arc::new(AtomicBool::new(true)))
}
#[inline(always)]
fn canContinue(&self) -> bool
{
debug_assert!(LogicalCore::isCurrentSlave(), "Can not call canContinue() on a master logical core");
self.0.load(Ordering::SeqCst)
}
#[inline(always)]
fn makeStop(&mut self)
{
debug_assert!(LogicalCore::isCurrentMaster(), "Can not call makeStop() on a slave logical core");
self.0.store(false, Ordering::SeqCst)
}
}