/fixes #9056 /claim #9056

Full disclosure, I’ve been working on enabling multi-threading support for Scala Native even before the bounty, but I thought to give #9117 a chance. After a very long number of review cycles, personally I think that PR requires too many changes to be in a a fully working state that it would take a significant amount of time to guide via reviews, so I ended up proceeding with opening a PR with what I’ve prepared since.

Anyhow, so this PR:

  1. Moves all the JVM code that can be used by Scala Native to /jvm-native. This means that the ZIO runtime in Scala Native is now using the same ZScheduler as in JVM applications
  2. Patches some parts here and there where we can’t use the JVM code so that the classes used by native are thread-safe. The most annoying one is java.util.concurrent.ConcurrentLinkedDeque, I will try to followup with the Scala Native team for what will be required to add support for it. I’m guessing it shouldn’t be too difficult since java.util.concurrent.ConcurrentLinkedQueue is already supported
  3. Runs all tests annotated with nonFlaky both for JVM and Native
  4. Runs all the test suites in parallel (PS: Native is running tests faster in some cases than the JVM 💡)
  5. Removes the scala-event-loop dependency
  6. Probably a bunch of other things, but in short, most of the Scala Native code is the same as the JVM, with the odd exceptions of extremely JVM-specific things (like Java streams, stream compression, etc.)

Claim

Total prize pool $1,500
Total paid $1,500
Status Approved
Submitted August 18, 2024
Last updated August 24, 2024

Contributors

KY

Kyri Petrou

@kyri-petrou

100%

Sponsors

ZI

ZIO

@ZIO

$1,500 paid