Skip to content

Commit

Permalink
wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Oct 4, 2024
1 parent d85e951 commit 544fb2d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/polars-io/src/csv/read/read_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ impl<'a> CoreReader<'a> {
// dbg!(c);
// dbg!(t.elapsed());
// std::process::exit(0);
#[cfg(not(target_family = "wasm"))]
let pool;
#[cfg(not(target_family = "wasm"))]
let pool = if n_threads != POOL.current_num_threads() {
&POOL
} else {
Expand All @@ -424,6 +426,8 @@ impl<'a> CoreReader<'a> {
.map_err(|_| polars_err!(ComputeError: "could not spawn threads"))?;
&pool
};
#[cfg(target_family = "wasm")]
let pool = POOL;

pool.scope(|s| {
let mut iter = SplitLines::new(bytes, self.quote_char, self.eol_char);
Expand Down

0 comments on commit 544fb2d

Please sign in to comment.