pub struct TaskSlot<R, E> { /* private fields */ }Expand description
Runner-side slot for one task submission.
This low-level endpoint is exposed so custom executor services built on top
of qubit-executor can wire their own scheduling while still returning the
standard crate::TaskHandle. Executor implementations should call
Self::accept only after submission succeeds; this arms lifecycle hook
reporting for later start and finish events. Normal callers should use
crate::TaskHandle and executor/service submission methods instead.
Implementations§
Source§impl<R, E> TaskSlot<R, E>
impl<R, E> TaskSlot<R, E>
Sourcepub fn accept(&self)
pub fn accept(&self)
Marks this runner endpoint as accepted and arms lifecycle hook reporting.
Calling this method emits on_accepted before any later on_started or
on_finished event for the same task. Executor implementations must call
it only after submission has succeeded. Dropping a slot before acceptance
still releases result waiters with Dropped, but does not emit lifecycle
hook events for a task that was rejected before acceptance.