-
Notifications
You must be signed in to change notification settings - Fork 66
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
Disable multithreading for all wasm32 targets. #71
Conversation
Thanks for your contribution :) I would prefer to change this to a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also like having parallel feature instead of all this wasm cfgs as there are probably other reasons for disabling threading.
src/dispatch/builder.rs
Outdated
@@ -239,7 +239,8 @@ impl<'a, 'b> DispatcherBuilder<'a, 'b> { | |||
/// Same as | |||
/// [`add_pool()`](struct.DispatcherBuilder.html#method.add_pool), | |||
/// but returns `self` to enable method chaining. | |||
#[cfg(not(target_os = "emscripten"))] | |||
#[cfg(not(target_arch = "wasm32"))] | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove empty line
Yeah, I'm all open for suggestions - I just wasn't sure what's the so called "best practice" approach would be. In general, you're right, there might be more reasons to disable multithreading than the target itself, but on the other hand, in this case (wasm32) target itself determine that you just can't have multithreading... On the other hand, here we not only have multithreading, we also have async ( |
Let's maybe coordinate it here: amethyst/specs#341 (comment) |
I've altered the conditionals to use "parallel" feature. |
Hmm, what's up with the versions though? master is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot about this PR, sorry. Thank you for the contribution!
This branch is essentially the future 0.6 version, just didn't bump the number in bors r+ |
Build succeeded |
With the coming of
wasm32-unknown-unknown
it might be good idea to usetarget_arch = "wasm32"
to detect whether to build with multithreading support or not.