formualizer-eval 0.14.0

High-performance Arrow-backed Excel formula engine with dependency graph and incremental recalculation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Permanent fail-closed marker. No recovery or mutation rollback is attempted.
use std::sync::{
    Arc,
    atomic::{AtomicBool, Ordering},
};
pub(crate) const POISON_MESSAGE: &str =
    "formualizer engine is poisoned by an earlier internal panic; discard it";

pub(super) struct UnwindPoisonGuard(pub(super) Arc<AtomicBool>);
impl Drop for UnwindPoisonGuard {
    fn drop(&mut self) {
        if std::thread::panicking() {
            self.0.store(true, Ordering::Release);
        }
    }
}