Open SethTisue opened 11 months ago
I haven't tested this, but I think a simple solution might be to just change https://github.com/scala/scala-parallel-collections/blob/ec2c34b6d9fb4cc6135cff502250738ed7f49e55/core/src/main/scala/scala/collection/parallel/package.scala#L39 to use parasitic
on native and js.
At least I think with that EC Await.result
will work on both native and js.
At least I think with that EC Await.result will work on both native and js
@sjrd agree?
Await.result
will never link on Scala.js. It doesn't matter what execution context you use. Await.result
has the potential to synchronously wait, so it won't link, period.
With the Scala Native 0.5.0 it would be beneficial to support Scala Native artifacts. With the added multithreading support there should be no issues with using parallel collections and scala.collection.concurrent
It is already tested based on Scala 2.12 Junit partests for almost a year now: https://github.com/scala-native/scala-native/pull/3149
Wow, cool! Yes, a PR on that would be welcome.
as suggested by @JD557
Pros:
Cons:
.par
using code compile but not get any actual parallelism