Skip to content

Commit

Permalink
fixed run without loom
Browse files Browse the repository at this point in the history
  • Loading branch information
rssh committed Sep 20, 2023
1 parent 711b753 commit 0d80082
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import java.util.concurrent.ConcurrentLinkedQueue
import java.util.concurrent.TimeoutException

import cps.testconfig.given
import cps.runtime.Loom

trait ComputationBound[+T] {

Expand Down Expand Up @@ -312,7 +311,7 @@ case class Thunk[T](thunk: ()=>ComputationBound[T]) extends ComputationBound[T]
case Success(cb) => cb
case Failure(ex) => Error(ex)
})
Loom.startVirtualThread{ () =>
Thread.startVirtualThread { () =>
try {
val r = thunk()
ref.set(Some(Success(r)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package cps
import scala.quoted._

import cps.testconfig.given
import cps.runtime.Loom


object ComputationBoundLoomUsage {
Expand Down

0 comments on commit 0d80082

Please sign in to comment.