pub struct RuntimeHandle {
pub input_tx: Sender<ReducerInput>,
pub event_log_tx: EventLogTx,
pub reducer_handle: JoinHandle<()>,
pub event_log_writer_handle: JoinHandle<()>,
pub worker_handles: Vec<JoinHandle<()>>,
}Expand description
Handle returned by spawn. Holds the input channel sender (cloneable
for HTTP route handlers) and the reducer-task JoinHandle. The handle
must outlive every cloned sender, otherwise the reducer task exits
prematurely.
Fields§
§input_tx: Sender<ReducerInput>§event_log_tx: EventLogTxCloneable handle to the event_log writer task. Route handlers and
the reducer-task applier send EventLogEntry values here; the
dedicated writer task drains and persists. See event_log_writer
for the backpressure rationale.
reducer_handle: JoinHandle<()>§event_log_writer_handle: JoinHandle<()>§worker_handles: Vec<JoinHandle<()>>Implementations§
Source§impl RuntimeHandle
impl RuntimeHandle
Sourcepub fn into_join_handles(self) -> Vec<JoinHandle<()>>
pub fn into_join_handles(self) -> Vec<JoinHandle<()>>
All background tasks owned by this runtime. The CP server::serve
drains these as part of the shutdown protocol (drain_background_tasks).
Auto Trait Implementations§
impl Freeze for RuntimeHandle
impl RefUnwindSafe for RuntimeHandle
impl Send for RuntimeHandle
impl Sync for RuntimeHandle
impl Unpin for RuntimeHandle
impl UnwindSafe for RuntimeHandle
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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