-
Notifications
You must be signed in to change notification settings - Fork 91
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
Support Scala Native multithreading #861
Support Scala Native multithreading #861
Conversation
… print stack trace of exceptions and acknoledge optional space before elapsed time on the JVM
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.
LGTM! Thanks!
Thread.sleep(ms) | ||
body | ||
if (!isMultithreadingEnabled) { | ||
// Thread.sleep(ms) |
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.
@WojciechMazur
Why was this added but commented out?
Now it looks like if multithreading is disabled we ignore timeout durations and run body immediately?
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 don't know what's the story of original Thread.sleep
call but it makes no sense to have it. The goal of this method was to introduce timeouts, instead it was only slowing the execution, while there was nothing else running in the background.
@WojciechMazur do we have an idea of what kind of issues this should fix? And ultimately, should we cut a new release with these changes? |
It would mostly allow to have the same semantics as when execution on the JVM. Can potentially also fix some issues in the async tests due to incorrect behaviour of The new release would be welcome, probably can be made as a patch |
Running the release https://github.com/scalameta/munit/releases/tag/v1.0.4 |
Since Scala Native 0.5.0 we have access to multithreading support, it's enabled by default if we detect usage of threading in the compiled code. This change does acknowledge multihreading support in PlatformCompat for Native (mostly copy-paste based on JVM implementation with minor changes)
Additional changes required to unsupress
Issue285FrameworkSuite
:<elapsed time>
pattern - it is sometimes produced by the JVM