Struct wasmer_vm::threadconditions::ThreadConditions
source · pub struct ThreadConditions {
inner: Arc<NotifyMap>,
}
Expand description
HashMap of Waiters for the Thread/Notify opcodes
Fields§
§inner: Arc<NotifyMap>
Implementations§
source§impl ThreadConditions
impl ThreadConditions
sourcepub fn do_wait(
&mut self,
dst: NotifyLocation,
timeout: Option<Duration>,
) -> Result<u32, WaiterError>
pub fn do_wait( &mut self, dst: NotifyLocation, timeout: Option<Duration>, ) -> Result<u32, WaiterError>
Add current thread to the waiter hash
sourcepub fn do_notify(&mut self, dst: NotifyLocation, count: u32) -> u32
pub fn do_notify(&mut self, dst: NotifyLocation, count: u32) -> u32
Notify waiters from the wait list
sourcepub fn wake_all_atomic_waiters(&self)
pub fn wake_all_atomic_waiters(&self)
Wake all the waiters, without marking them as notified.
Useful on shutdown to resume execution in all waiters.
sourcepub fn disable_atomics(&self)
pub fn disable_atomics(&self)
Disable the use of atomics, leading to all atomic waits failing with an error, which leads to a Webassembly trap.
Useful for force-closing instances that keep waiting on atomics.
sourcepub fn downgrade(&self) -> ThreadConditionsHandle
pub fn downgrade(&self) -> ThreadConditionsHandle
Get a weak handle to this ThreadConditions
instance.
See ThreadConditionsHandle
for more information.
Trait Implementations§
source§impl Clone for ThreadConditions
impl Clone for ThreadConditions
Auto Trait Implementations§
impl Freeze for ThreadConditions
impl !RefUnwindSafe for ThreadConditions
impl Send for ThreadConditions
impl Sync for ThreadConditions
impl Unpin for ThreadConditions
impl !UnwindSafe for ThreadConditions
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.