Skip to content

Commit

Permalink
Merge branch 'master-3.4.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
rssh committed Jul 18, 2024
2 parents 4c51228 + c71879e commit 95cc42d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions native/src/test/scala/cps/ComputationBound.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ trait ComputationBound[+T] {
ComputationBound.advanceDeferredQueueTicks(timeRest, ref.get().isDefined).flatMap{ r =>
ref.get match
case Some(v) => op(v).runTicksDeadline(deadline)
case None =>
Future failed (new TimeoutException(s"ref $ref is empty"))
case None =>
if (deadline >= System.currentTimeMillis) then
Future failed (new TimeoutException(s"ref is empty in $w up to timeout (not completed)"))
else
ComputationBound.advanceDeferredQueueTicks(timeRest, ref.get().isDefined).flatMap{ r =>
ref.get match
case Some(v) => op(v).runTicksDeadline(deadline)
case None => Future failed (new TimeoutException(s"ref is empty in $w up to second timeout (not completed)"))
}
}
else
println(s"failed: wwaiting for $ref in $w")
Expand Down

0 comments on commit 95cc42d

Please sign in to comment.