pub struct SharedPoolMorselScheduler { /* private fields */ }Implementations§
pub fn new(pool: SharedExecutorPool) -> Self
pub fn execute<T, F>( &self, admission: &MorselAdmission, execute: F, ) -> Result<Vec<T>>
Sourcepub fn execute_with_context<T, F>(
&self,
admission: &MorselAdmission,
context: &RuntimeTaskContext,
execute: F,
) -> Result<Vec<T>>
pub fn execute_with_context<T, F>( &self, admission: &MorselAdmission, context: &RuntimeTaskContext, execute: F, ) -> Result<Vec<T>>
Typed resource failures stop cooperating siblings and preserve the first resource cause. Ordinary callback errors retain input-ordered collection. Use a child context when the parent will be reused for later work.
Sourcepub fn execute_accounted_ordered<T, F, C>(
&self,
admission: &MorselAdmission,
resources: MorselStreamResources<'_>,
execute: F,
consume: C,
) -> Result<MorselStreamReport>where
T: Send,
F: Fn(Morsel) -> Result<MorselOutput<T>> + Sync,
C: FnMut(Morsel, T) -> Result<MorselStreamControl>,
pub fn execute_accounted_ordered<T, F, C>(
&self,
admission: &MorselAdmission,
resources: MorselStreamResources<'_>,
execute: F,
consume: C,
) -> Result<MorselStreamReport>where
T: Send,
F: Fn(Morsel) -> Result<MorselOutput<T>> + Sync,
C: FnMut(Morsel, T) -> Result<MorselStreamControl>,
Streams worker outputs through a bounded channel and invokes the coordinator consumer in stable morsel ordinal order.
output_reservation_bytes is charged before the worker calls
execute. The returned resident estimate must fit that reservation.
The lease remains live through consume, so a consumer that retains
the value must transfer it into another query-owned account.
A terminal typed resource refusal stops dispatch and signals resource
exhaustion on task_context before joining in-flight callbacks. Callbacks
must check that same context to stop cooperatively. The original resource
error is returned. Use a child context to isolate a reusable parent.
Trait Implementations§
Auto Trait Implementations§
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> 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