pub struct TensorFlowController { /* private fields */ }Expand description
Controls the flow of tensor data through a processing pipeline.
The internal queue is kept sorted by priority descending (Critical first),
then by enqueued_at_tick ascending (FIFO within a priority level).
Implementations§
Source§impl TensorFlowController
impl TensorFlowController
Sourcepub fn new(config: FlowControllerConfig) -> Self
pub fn new(config: FlowControllerConfig) -> Self
Create a new controller with the given configuration, starting in Running state.
Sourcepub fn admit(&mut self, item: FlowItem) -> bool
pub fn admit(&mut self, item: FlowItem) -> bool
Attempt to admit a new item into the queue.
Returns true if the item was admitted, false if it was dropped.
Sourcepub fn process_tick(&mut self) -> Vec<FlowItem>
pub fn process_tick(&mut self) -> Vec<FlowItem>
Process one tick: drain items from the front of the queue up to the byte budget.
Returns the items that were processed during this tick.
Auto Trait Implementations§
impl Freeze for TensorFlowController
impl RefUnwindSafe for TensorFlowController
impl Send for TensorFlowController
impl Sync for TensorFlowController
impl Unpin for TensorFlowController
impl UnsafeUnpin for TensorFlowController
impl UnwindSafe for TensorFlowController
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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