Skip to main content

with

Function with 

Source
pub fn with<R>(e: Arc<Ext>, f: impl FnOnce() -> R) -> R
Expand description

f を表 e の下で回す(文脈のほかの項目は引き継ぐ)。表が引き継がれるのは par の並列(par::scoped など)の 作業のスレッドまでで、f の中で自分で作ったスレッド(std::thread::spawn・rayon を直に使う所)ではプロセスの既定に戻る