This commit is contained in:
2026-02-03 03:25:31 +01:00
parent a07a87a35f
commit e337eb35e7
8 changed files with 125 additions and 32 deletions

View File

@@ -1,3 +1,4 @@
use arc_swap::ArcSwap;
use cagire::forth::{Dictionary, Forth, Rng, StepContext, Value, Variables};
use parking_lot::Mutex;
use rand::rngs::StdRng;
@@ -32,7 +33,7 @@ pub fn ctx_with(f: impl FnOnce(&mut StepContext<'static>)) -> StepContext<'stati
}
pub fn new_vars() -> Variables {
Arc::new(Mutex::new(HashMap::new()))
Arc::new(ArcSwap::from_pointee(HashMap::new()))
}
pub fn new_dict() -> Dictionary {