/// Check that the current thread can make an immutable access without
/// violating the Rust memory model.
///
/// Specifically, this function checks that there is no concurrent mutable
/// access with this immutable access, while allowing many concurrent
/// immutable accesses.
Check that the current thread can make an immutable access without
violating the Rust memory model.

Specifically, this function checks that there is no concurrent mutable
access with this immutable access, while allowing many concurrent
immutable accesses.
Check that the current thread can make an immutable access without violating the Rust memory model . Specifically this function checks that there is no concurrent mutable access with this immutable access while allowing many concurrent immutable accesses .
pub fn check(&self) {
        rt::execution(|execution| {
            let mut immut_access_version = self.immut_access_version.borrow_mut();
            let mut_access_version = self.mut_access_version.borrow();
            let thread_id = execution.threads.active_id();
            let thread_causality = &execution.threads.active().causality;
            // Check that there is no concurrent mutable access, i.e., the last
            // mutable access must happen-before this immutable access.
            assert!(
                *mut_access_version <= *thread_causality,
                "Causality violation: \
                 Concurrent mutable access and immutable access(es): \
                 cell.with: v={:?}; mut v: {:?}; thread[{}]={:?}",
                immut_access_version,
                mut_access_version,
                thread_id,
                thread_causality,
            );
            // Join in the vector clock time of this immutable access.
            //
            // In this case, `immut_access_version` is the transitive closure of
            // all concurrent immutable access versions.
            immut_access_version.join(thread_causality);
        });
    }
pub fn check ( & self ) { rt :: execution ( | execution | { let mut immut_access_version = self . immut_access_version . borrow_mut ( ) ; let mut_access_version = self . mut_access_version . borrow ( ) ; let thread_id = execution . threads . active_id ( ) ; let thread_causality = & execution . threads . active ( ) . causality ; // Check that there is no concurrent mutable access, i.e., the last // mutable access must happen-before this immutable access. assert ! ( mut_access_version thread_causality " \
 \
 " immut_access_version mut_access_version thread_id thread_causality ) ; // Join in the vector clock time of this immutable access. // // In this case, `immut_access_version` is the transitive closure of // all concurrent immutable access versions. immut_access_version . join ( thread_causality ) ; } ) ; }
Check that the current thread can make an immutable access without
violating the Rust memory model.
Check that the current thread can make an immutable access without violating the Rust memory model .
&self