pub enum SpawnRequest<Inline = Infallible> {
Send(Pin<Box<dyn Future<Output = ()> + Send + 'static>>),
Factory(Box<dyn FnOnce() -> Pin<Box<dyn Future<Output = ()> + 'static>> + Send + 'static>),
SendInline(Inline),
Shutdown,
}Expand description
Cross-core worker dispatch message used by Runtime impls. Generic
over an Inline extension type so prime’s typed-future fast path can
add a variant (SendInline) carrying its InlineTask, while tokio’s
per-core impl uses the default (Infallible) which makes the
SendInline arm unreachable.
Trace-span context no longer travels embedded in this enum (moved to
telemetry::Spanned<T>, which wraps the future itself) — see Wave D
Phase 1.
Variants§
Send(Pin<Box<dyn Future<Output = ()> + Send + 'static>>)
A Send future shipped across cores; runs locally on arrival.
Factory(Box<dyn FnOnce() -> Pin<Box<dyn Future<Output = ()> + 'static>> + Send + 'static>)
A Send closure that builds a ?Send future on the target core.
Lets cross-thread callers dispatch per-core-only futures.
SendInline(Inline)
Runtime-impl-specific extension. Default (Infallible) makes this
arm unreachable. Prime sets Inline = InlineTask to carry typed
futures without the Pin<Box<dyn Future>> allocation.
Shutdown
Graceful shutdown signal — the worker breaks its event loop.