Struct sgx_sync::Condvar

source ·
pub struct Condvar { /* private fields */ }
Expand description

An SGX-based condition variable.

Implementations§

source§

impl Condvar

source

pub const fn new() -> Condvar

Creates a new condition variable for use.

source

pub fn notify_one(&self)

Signals one waiter on this condition variable to wake up.

source

pub fn notify_all(&self)

Awakens all current waiters on this condition variable.

source

pub unsafe fn wait(&self, mutex: &MovableMutex)

Waits for a signal on the specified mutex.

Behavior is undefined if the mutex is not locked by the current thread.

May panic if used with more than one mutex.

source

pub unsafe fn wait_timeout(&self, mutex: &MovableMutex, dur: Duration) -> bool

Waits for a signal on the specified mutex with a timeout duration specified by dur (a relative time into the future).

Behavior is undefined if the mutex is not locked by the current thread.

May panic if used with more than one mutex.

Trait Implementations§

source§

impl Default for Condvar

source§

fn default() -> Condvar

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.