mcrl2::aterm::busy_forbidden

Struct BfTermPool

Source
pub struct BfTermPool<T: ?Sized> { /* private fields */ }
Expand description

Provides access to the mCRL2 busy forbidden protocol, where there are thread local busy flags and one central storage for the forbidden flags. Care must be taken to avoid deadlocks since the FFI also uses the same flags.

Implementations§

Source§

impl<T> BfTermPool<T>

Source

pub fn new(object: T) -> BfTermPool<T>

Source§

impl<'a, T: ?Sized> BfTermPool<T>

Source

pub fn read(&'a self) -> BfTermPoolRead<'a, T>

Provides read access to the underlying object.

Source

pub fn write(&'a self) -> BfTermPoolWrite<'a, T>

Provides write access to the underlying object.

Source

pub unsafe fn get(&'a self) -> &'a T

Provides read access to the underlying object.

§Safety

Assumes that we are in an exclusive section.

Source

pub unsafe fn write_exclusive(&'a self) -> BfTermPoolThreadWrite<'a, T>

Provides write access to the underlying object

§Safety

Provides mutable access given that other threads use write and [read] exclusively. If we are already in an exclusive context then lock can be set to false.

Trait Implementations§

Source§

impl<T: Markable + ?Sized> Markable for BfTermPool<T>

Source§

fn mark(&self, todo: Pin<&mut term_mark_stack>)

Marks all the ATermRefs to prevent them from being garbage collected.
Source§

fn contains_term(&self, term: &ATermRef<'_>) -> bool

Should return true iff the given term is contained in the object. Used for runtime checks.
Source§

fn len(&self) -> usize

Returns the number of terms in the instance, used to delay garbage collection.
Source§

fn is_empty(&self) -> bool

Returns true iff the container is empty.
Source§

impl<T: Send> Send for BfTermPool<T>

Source§

impl<T: Send> Sync for BfTermPool<T>

Auto Trait Implementations§

§

impl<T> !Freeze for BfTermPool<T>

§

impl<T> !RefUnwindSafe for BfTermPool<T>

§

impl<T> Unpin for BfTermPool<T>
where T: Unpin + ?Sized,

§

impl<T> UnwindSafe for BfTermPool<T>
where T: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V