Skip to main content

run_with_large_stack

Function run_with_large_stack 

Source
pub fn run_with_large_stack<F, R>(f: F) -> R
where F: FnOnce() -> R + Send + 'static, R: Send + 'static,
Expand description

Execute f on a dedicated thread with a larger stack in debug builds to avoid overflows from deep recursion. In release builds, run directly without the extra thread to reduce overhead.