From a1108fcc319c9abc332550bf1f473f4fdc55512d Mon Sep 17 00:00:00 2001 From: Shritesh Bhattarai Date: Sat, 6 Jan 2024 01:28:24 -0800 Subject: [PATCH] feat(rust): Implement wasm Pool::scope (#13476) --- crates/polars-utils/src/wasm.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/polars-utils/src/wasm.rs b/crates/polars-utils/src/wasm.rs index 5f0293a4d3fe..9325d11a8bc5 100644 --- a/crates/polars-utils/src/wasm.rs +++ b/crates/polars-utils/src/wasm.rs @@ -37,4 +37,12 @@ impl Pool { { rayon::spawn(func); } + + pub fn scope<'scope, OP, R>(&self, op: OP) -> R + where + OP: FnOnce(&rayon::Scope<'scope>) -> R + Send, + R: Send, + { + rayon::scope(op) + } }