Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: don't rayon-parallelise when on wasm32 #83

Merged
merged 1 commit into from
Oct 18, 2019
Merged

Suggestion: don't rayon-parallelise when on wasm32 #83

merged 1 commit into from
Oct 18, 2019

Conversation

wehlutyk
Copy link
Contributor

For now, the story for spawning threads on wasm is not entirely settled (see the conversation in rayon-rs/rayon#636), meaning that using par_iter() and par_chunks() panics in the browser.

One solution is for lopdf consumers to follow the parallel raytracing example from wasm-bindgen, but at the time of writing that makes building a binary pretty non-standard.

So this PR proposes to simply disable rayon parallelisation when building for wasm, until the story for wasm threads reaches a more stable state. Let me know what you think!

wehlutyk added a commit to wehlutyk/infuse that referenced this pull request Oct 16, 2019
@J-F-Liu J-F-Liu merged commit d4fa2c2 into J-F-Liu:master Oct 18, 2019
@wehlutyk
Copy link
Contributor Author

Thanks!

@wehlutyk wehlutyk deleted the conditional-rayon branch October 18, 2019 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants