-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add support for threading compiler flag to Rust target #1098
Conversation
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.
Looks great!
Do you think we could port the Workers Test as part of this PR to Rust? I think for Rust, the test should also check that threading is indeed enabled (which it should be by default). I think we should also add another test that explicitly sets threading: false
and checks that the single threaded runtime is used.
In that case we would need a similar feature for the runtime that reports back the number of workers. Is the manual override from the LF file okay? If the |
Do you think this would be possible to add with reasonable effort? What do you mean by "If the parallel-runtime feature is enabled from a file"? If threading is set to false, then parallel execution should be disabled. If the parallel runtime feature is requested manually and threading is set to false, then we should probably stick to the manual specification, but I think it would be a good idea to also issue a warning. |
Yes, probably. I already opened an issue for it.
It looks like this:
Right now this would enable the parallel runtime independent of the |
Alright, I think this is Ok and we cannot really avoid it. However, if |
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.
(nitpicks)
How can I do that? |
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.
Great!
Based on the given threading flag, the
parallel-runtime
feature is enabled for the Rust runtime in the generated code.The way it is implemented right now allows one to override the flag by setting the feature manually in the LF source. There is however no option to disable it the same way.