Type Definition jrsonnet_gcmodule::ThreadedCc
source · [−]pub type ThreadedCc<T> = RawCc<T, ThreadedObjectSpace>;
Expand description
A multi-thread reference-counting pointer that integrates with cyclic garbage collection.
ThreadedCc
is similar to Cc
.
It works with multi-thread but is significantly slower than
Cc
.
To construct a ThreadedCc
, use
ThreadedObjectSpace::create
.
Implementations
sourceimpl<T: ?Sized> ThreadedCc<T>
impl<T: ?Sized> ThreadedCc<T>
sourcepub fn borrow(&self) -> ThreadedCcRef<'_, T>
pub fn borrow(&self) -> ThreadedCcRef<'_, T>
Immutably borrows the wrapped value.
The borrow lasts until the returned value exits scope.