pub struct ZirconThread {
pub thread: Arc<Thread>,
pub koid: Koid,
}Expand description
A synchronized container for a Zircon thread and its cached KOID.
Fields§
§thread: Arc<Thread>The underlying Zircon thread.
§Thread Safety
Blocking operations are unsafe while holding RCU read locks. However, references to this
thread must be held across blocking operations (e.g., futex waits). The ZirconThread
container as a whole is guarded by RCU because it is a member of the RCU-guarded
TaskRunningState. This field is reference counted so it can be accessed outside of RCU
locks through a strong reference.
Holding a reference to the thread does not guarantee that the task to which it belongs will
continue running. The task may exit at any time. The thread will continue to exist in memory
until all references are dropped. When the task exits and execution stops, reference holders
will observe the thread transition to zx::ThreadState::Dead normally.
koid: KoidImplementations§
Trait Implementations§
Source§impl Clone for ZirconThread
impl Clone for ZirconThread
Source§fn clone(&self) -> ZirconThread
fn clone(&self) -> ZirconThread
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ZirconThread
impl Debug for ZirconThread
Auto Trait Implementations§
impl Freeze for ZirconThread
impl RefUnwindSafe for ZirconThread
impl Send for ZirconThread
impl Sync for ZirconThread
impl Unpin for ZirconThread
impl UnsafeUnpin for ZirconThread
impl UnwindSafe for ZirconThread
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more