pub struct MonitorEvent {
pub thread: ThreadId,
pub location: Location,
pub monitor: ObjectId,
}Expand description
Which monitor was contended, by which thread, at what code.
The context all four monitor events carry. They differ only in what (if anything) follows it, so it
lives in one struct, exactly as FieldEvent does for the two field events.
Fields§
§thread: ThreadIdThe thread that blocked, acquired, waited or finished waiting.
location: LocationThe code that was executing, not where the monitor’s type is declared — for a
synchronized block, the block’s own location.
monitor: ObjectIdThe monitor object itself. Arrives as a tagged-objectID and is a weak reference like every other object id here (ADR-0022), so a pairing keyed on it must not assume it stays readable.
Trait Implementations§
Source§impl Clone for MonitorEvent
impl Clone for MonitorEvent
Source§fn clone(&self) -> MonitorEvent
fn clone(&self) -> MonitorEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MonitorEvent
impl Debug for MonitorEvent
Source§impl<'de> Deserialize<'de> for MonitorEvent
impl<'de> Deserialize<'de> for MonitorEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MonitorEvent
impl RefUnwindSafe for MonitorEvent
impl Send for MonitorEvent
impl Sync for MonitorEvent
impl Unpin for MonitorEvent
impl UnsafeUnpin for MonitorEvent
impl UnwindSafe for MonitorEvent
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
Mutably borrows from an owned value. Read more