[−][src]Trait flize::Shield
Universal methods for any shield implementation.
Required methods
fn repin(&mut self)
Attempt to synchronize the current thread to allow advancing the global epoch.
This might be useful to call every once in a while if you plan on holding a Shield
for an extended amount of time as to not stop garbage collection.
This is only effective if this is the only active shield created by this thread.
Has no effect when called from an unprotected
shield.
fn repin_after<F, R>(&mut self, f: F) -> R where
F: FnOnce() -> R,
F: FnOnce() -> R,
Attempt to synchronize the current thread like Shield::repin
but executing a closure
during the time the Shield
is temporarily deactivated.
If this method is called from an unprotected
shield, the closure will be executed
immediately without unpinning the thread.
fn retire<F>(&self, f: F) where
F: FnOnce() + 'a,
F: FnOnce() + 'a,
Schedule a closure for execution once no shield may hold a reference to an object unlinked with the current shield.
If this method is called from an unprotected
shield, the closure will be executed
immediately.
Implementors
impl<'a> Shield<'a> for FullShield<'a>
[src]
fn repin(&mut self)
[src]
fn repin_after<F, R>(&mut self, f: F) -> R where
F: FnOnce() -> R,
[src]
F: FnOnce() -> R,
fn retire<F>(&self, f: F) where
F: FnOnce() + 'a,
[src]
F: FnOnce() + 'a,
impl<'a> Shield<'a> for ThinShield<'a>
[src]
fn repin(&mut self)
[src]
fn repin_after<F, R>(&mut self, f: F) -> R where
F: FnOnce() -> R,
[src]
F: FnOnce() -> R,
fn retire<F>(&self, f: F) where
F: FnOnce() + 'a,
[src]
F: FnOnce() + 'a,