Skip to main content

ThreadRunner

Struct ThreadRunner 

Source
pub struct ThreadRunner { /* private fields */ }
Expand description

The persistent-thread runner. submit_*/reset push Commands down the channel; poll_* first DRAIN every ready Reply into the two demux buffers, then pop the matching one. The SceneRunner (and thus the kernel’s resident registry it warms) lives ENTIRELY on the thread — it is never shared — so the only cross-thread traffic is the Send command/reply payloads.

Implementations§

Source§

impl ThreadRunner

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Default for ThreadRunner

Available on non-WebAssembly only.
Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for ThreadRunner

Available on non-WebAssembly only.
Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl HistoryRunner for ThreadRunner

Available on non-WebAssembly only.
Source§

fn cancel(&mut self) -> bool

Abandon the thread: raise its stop flag, close its channels, and spawn a fresh thread with a fresh registry. The old thread cannot be interrupted inside a feature — it finishes the one it is on (burning CPU until then), sees the flag, and exits. Always true: there is always a thread to replace.

Source§

fn submit_run(&mut self, request: HistoryRequest, generation: u64)

Submit a history run tagged with a monotonic generation. The runner executes it (immediately for Inline; on a background thread later) and makes the reply available via poll_run.
Source§

fn sync_parts_library( &mut self, revision: u64, fetch: &mut dyn FnMut() -> PartsLibraryMap, )

Bring the runner’s resident PARTS LIBRARY up to revision, calling fetch ONLY when it is not already there. Called immediately before every submit_run. Read more
Source§

fn poll_library_request(&mut self) -> bool

True when the runner REFUSED a run because its resident parts library could not serve it (see Reply::NeedPartsLibrary). It has already forgotten its copy, so the next sync_parts_library reinstalls; the caller must re-submit the run. Never true for a runner that shares the caller’s store.
Source§

fn poll_run(&mut self) -> Option<RunReply>

Non-blocking: the next completed run reply, if any (drained each frame).
Source§

fn submit_query(&mut self, query: MeasureQuery)

Submit a per-object measurement query (answered against the runner’s warm registry). Inline computes it immediately; a thread impl computes it on the runner thread and surfaces it via poll_query.
Source§

fn poll_query(&mut self) -> Option<MeasureReply>

Non-blocking: the next completed measurement reply, if any.
Source§

fn submit_mesh_import(&mut self, request: MeshImportRequest)

Submit RANSAC mesh reconstruction to the runner’s thread/worker.
Source§

fn poll_mesh_import(&mut self) -> Option<MeshImportReply>

Non-blocking: the next completed mesh reconstruction, if any.
Source§

fn submit_step_probe(&mut self, request: StepProbeRequest)

Submit a STEP product-structure probe (see StepProbeRequest).
Source§

fn poll_step_probe(&mut self) -> Option<StepProbeReply>

Non-blocking: the next completed STEP probe, if any.
Source§

fn poll_progress(&mut self) -> Option<RunProgress>

Non-blocking: the MOST RECENT progress report of the in-flight run, with any older ones discarded (only the latest feature matters). None for a synchronous runner — Inline has finished before anyone could ask.
Source§

fn reset(&mut self)

Drop the delta baseline (document switch → full rebuild).

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,