Created
June 30, 2026 12:37
-
-
Save lbialy/7ca559d3b978bfe341ec6f366baff576 to your computer and use it in GitHub Desktop.
par — platform JS (R[A]=Future[A]) — scala/toolkit#31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.concurrent.* | |
| object platform: | |
| type R[A] = Future[A] | |
| def parRun[A](parallelism: Int)(body: ExecutionContext => Future[A]): R[A] = | |
| import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue | |
| body(summon[ExecutionContext]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment