Skip to main content

admit_spawn

Function admit_spawn 

Source
pub(crate) fn admit_spawn(
    avail_commit_gb: Option<f64>,
    reserve_gb: f64,
) -> Result<(), AgentError>
Expand description

Pure admission decision: is there enough free system commit to spawn another agent? None available (non-Windows, or the read failed) ⇒ admit — there’s no cheap commit limit to enforce. Strict < so a value exactly at the reserve is admitted. CEF-free / OS-free so it is fully unit-testable.