Skip to main content

with_timeout

Function with_timeout 

Source
pub fn with_timeout(parent: &Context, timeout: Duration) -> (Context, CancelFn)
Expand description

Return a child context that is automatically cancelled after timeout.

Sugar over with_deadline.

§Requirements

Same as with_deadline — must be called from within go_lib::run.