Skip to main content

AsyncSource

Struct AsyncSource 

Source
pub struct AsyncSource<P: Send + 'static> { /* private fields */ }
Expand description

Zellquelle mit Worker-Pool (siehe Modul-Doku).

Determinismus-Hinweis: Die Reihenfolge, in der Zellen fertig werden, bestimmt die Laufzeit — der Streamer pollt sie trotzdem in seiner festen Prioritätsordnung, und alle Budget- und Verdrängungs-Entscheidungen bleiben reproduzierbar.

Implementations§

Source§

impl<P: Send + 'static> AsyncSource<P>

Source

pub fn new<S: BlockStore>(store: S, codec: CellCodec<P>, workers: usize) -> Self

workers hintere Store-Threads; 0 wird zu 1. Der Pool lebt, bis die Quelle fällt — dann schließen sich die Kanäle und die Worker beenden sich von selbst.

Source

pub fn pending_results(&self) -> usize

Anzahl noch nicht abgeholter fertiger Zellen (Diagnose/Tests).

Trait Implementations§

Source§

impl<P: Send + 'static> CellSource for AsyncSource<P>

Source§

type Payload = P

Payload-Typ einer Zelle (z. B. Handles auf Mesh-/Batch-Bündel).
Source§

fn start(&mut self, cell: CellKey, _now: f64) -> Result<(), LoadError>

Ladung aufnehmen. Err heißt: sofortiger Fehlschlag, kein poll.
Source§

fn poll(&mut self, cell: CellKey, _now: f64) -> PollResult<P>

Fortschritt abfragen.
Source§

fn cancel(&mut self, cell: CellKey)

Der Streamer braucht die Zelle nicht mehr (nur Höflichkeit — eine bereits fertige Payload darf trotzdem geliefert werden).

Auto Trait Implementations§

§

impl<P> !Sync for AsyncSource<P>

§

impl<P> Freeze for AsyncSource<P>

§

impl<P> RefUnwindSafe for AsyncSource<P>
where P: RefUnwindSafe,

§

impl<P> Send for AsyncSource<P>

§

impl<P> Unpin for AsyncSource<P>
where P: Unpin,

§

impl<P> UnsafeUnpin for AsyncSource<P>

§

impl<P> UnwindSafe for AsyncSource<P>
where P: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.