pub(crate) static THREAD_TERM_POOL: RefCell<ThreadTermPool> = RefCell::new(ThreadTermPool::new());
/// This is a stupid hack, but we need to periodically test for garbage collection and this is only allowed outside of a shared
let (protection_set, container_protection_set, index) = GLOBAL_TERM_POOL.lock().register_thread_term_pool();
_callback: ManuallyDrop::new(ffi::register_mark_callback(mark_protection_sets, protection_set_size)),
pub fn protect_container(&mut self, container: Arc<dyn Markable + Send + Sync>) -> usize {
let root = unsafe { self.container_protection_set.write_exclusive().protect(container) };
// It can be that data_applications are created without create_data_application in the mcrl2 ffi.
let term: *const ffi::_aterm = ffi::create_aterm(symbol.borrow().address(), &self.arguments);