pub struct ModalityIngestThreadHandle { /* private fields */ }
Expand description
A handle to control the spawned ingest thread.
Implementations§
Source§impl ModalityIngestThreadHandle
impl ModalityIngestThreadHandle
Sourcepub fn finish(self)
pub fn finish(self)
Stop accepting new trace events, flush all existing events, and stop ingest thread.
This function must be called at the end of your main thread to give the ingest thread a chance to flush all queued trace events out to modality.
§Panics
This function uses std::thread::JoinHandle::join
which may panic on some platforms if a
thread attempts to join itself or otherwise may create a deadlock with joining threads.
This case should be incredibly unlikely, if not impossible, but can not be statically
guarenteed.
Auto Trait Implementations§
impl Freeze for ModalityIngestThreadHandle
impl !RefUnwindSafe for ModalityIngestThreadHandle
impl Send for ModalityIngestThreadHandle
impl Sync for ModalityIngestThreadHandle
impl Unpin for ModalityIngestThreadHandle
impl !UnwindSafe for ModalityIngestThreadHandle
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