Skip to content

Commit

Permalink
Fix WASM builds
Browse files Browse the repository at this point in the history
  • Loading branch information
james7132 committed Apr 21, 2024
1 parent 1292826 commit 852b3dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ impl Executor {
}
}

#[cfg(target_family = "wasm")]
fn max_threads() -> usize {
DEFAULT_MAX_THREADS
}

/// Get a reference to the global executor.
#[inline]
fn get() -> &'static Self {
Expand All @@ -184,7 +189,7 @@ impl Executor {
cvar: Condvar::new(),
};

return &EXECUTOR;
&EXECUTOR
}

#[cfg(target_family = "wasm")]
Expand Down

0 comments on commit 852b3dc

Please sign in to comment.