pub enum SpawnError {
InboxFull,
Disconnected,
}Expand description
Failure modes for cross-core spawn dispatch. Surfaced by
Runtime::spawn_on_core and Runtime::spawn_factory_on_core so callers
must explicitly handle back-pressure rather than relying on silent
drops — which was the cause of the inbox-saturation hang exposed by
runtime_spawn_on_core_silently_drops_on_inbox_overflow in earlier
versions.
InboxFull is transient: retry by rebuilding the future and calling
again, ideally with a small backoff. The spawn_on_core_blocking_with
helper below automates this loop.
Disconnected is terminal: the target core has shut down. The
future is dropped; retrying will return the same error.
Implementations that cannot fail on back-pressure (e.g. tokio’s
flume::unbounded() mpsc never returns Full) will simply never
produce InboxFull and callers see Ok(()) in the steady state.
Variants§
InboxFull
The target core’s inbox lane is at capacity. The future has been
dropped; the caller should rebuild and retry (see
spawn_on_core_blocking_with).
Disconnected
The target core has shut down or never existed (out-of-range
CoreId). The future is dropped; retrying is futile.
Trait Implementations§
Source§impl Clone for SpawnError
impl Clone for SpawnError
impl Copy for SpawnError
Source§impl Debug for SpawnError
impl Debug for SpawnError
Source§impl Display for SpawnError
impl Display for SpawnError
impl Eq for SpawnError
Source§impl Error for SpawnError
impl Error for SpawnError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()