pub struct Deadline { /* private fields */ }Expand description
Per-run wall-clock ceiling for the compute phases.
The timeout parameter only ever reached git subprocesses
(set_git_timeout); the native CLI is protected by a process-level
watchdog that exits 124, but the library path — pyo3, and through it the
MCP server — had no ceiling at all: a 420s timeout was observed to sit
through an 8-minute edge build without firing.
A per-run value rather than a process global (#210): the MCP server runs overlapping pipelines on worker threads, and a shared atomic meant the last request to arrive overwrote every in-flight request’s ceiling — and an expired ceiling was never cleared, so unrelated later runs in the same process (the yaml harness above all) inherited it.
Expiry panics with a recognizable message on purpose: the phase runs deep
inside call chains that do not return Result, rayon propagates the
unwind to the caller, and pyo3 surfaces it as a Python exception — an
error after timeout seconds, where before there was a hang.
Implementations§
Source§impl Deadline
impl Deadline
Sourcepub fn from_timeout_secs(timeout_secs: u64) -> Self
pub fn from_timeout_secs(timeout_secs: u64) -> Self
Saturating: an absurd caller-supplied timeout must clamp to “no
ceiling”, not wrap behind now and fire instantly.
pub fn none() -> Self
pub fn check(&self, phase: &str)
Sourcepub fn enter(&self) -> ScopedDeadline
pub fn enter(&self) -> ScopedDeadline
Publishes this deadline to the current thread for the guard’s
lifetime, so hot loops deep inside edge builders can poll it via
check_current_every without threading a parameter through 51
EdgeBuilder::build implementations. Each rayon worker publishes its
own copy, so concurrent runs never see each other’s ceiling.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Deadline
impl RefUnwindSafe for Deadline
impl Send for Deadline
impl Sync for Deadline
impl Unpin for Deadline
impl UnsafeUnpin for Deadline
impl UnwindSafe for Deadline
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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