Type Alias 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.

Aliased Type§

pub struct ThreadedCc<T>(/* private fields */);

Implementations§

Source§

impl<T: ?Sized> ThreadedCc<T>

Source

pub fn borrow(&self) -> ThreadedCcRef<'_, T>

Immutably borrows the wrapped value.

The borrow lasts until the returned value exits scope.

Trait Implementations§

Source§

impl<T: Trace> Trace for ThreadedCc<T>

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Define how to visit values referred by this value. Read more
Source§

fn is_type_tracked() -> bool

Whether this type should be tracked by the collector. Read more
Source§

impl Trace for ThreadedCc<dyn Trace + Send + Sync>

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Define how to visit values referred by this value. Read more
Source§

fn is_type_tracked() -> bool

Whether this type should be tracked by the collector. Read more
Source§

impl Trace for ThreadedCc<dyn Trace + Send>

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Define how to visit values referred by this value. Read more
Source§

fn is_type_tracked() -> bool

Whether this type should be tracked by the collector. Read more
Source§

impl Trace for ThreadedCc<dyn Trace>

Source§

fn trace(&self, tracer: &mut Tracer<'_>)

Define how to visit values referred by this value. Read more
Source§

fn is_type_tracked() -> bool

Whether this type should be tracked by the collector. Read more
Source§

impl<T: Send + Sync> Send for ThreadedCc<T>

Source§

impl<T: Send + Sync> Sync for ThreadedCc<T>