Provide a cross-platform execution context.
JVM: scala.concurrent.ExecutionContext.global
JS: org.scalajs.macrotaskexecutor.MacrotaskExecutor
Native: Custom EC similar to scala.scala-native.ExecutionContext.QueueExecutionContext, that runs one (or more?) tasks on each loop iteration. When the loop exits, it should just push the queued tasks to the global EC.
Provide a cross-platform execution context.
JVM:
scala.concurrent.ExecutionContext.globalJS:
org.scalajs.macrotaskexecutor.MacrotaskExecutorNative: Custom EC similar to
scala.scala-native.ExecutionContext.QueueExecutionContext, that runs one (or more?) tasks on each loop iteration. When the loop exits, it should just push the queued tasks to the global EC.