From 7ce6b9c98856fbd85fb686759b9122f846bb01c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=B6lzer?= Date: Wed, 7 Mar 2018 20:31:12 +0100 Subject: [PATCH] Remove whileQuiescentResolve* methods. --- .../scala/com/phaller/rasync/HandlerPool.scala | 14 -------------- .../scala/com/phaller/rasync/test/LazySuite.scala | 2 +- .../test/scala/com/phaller/rasync/test/base.scala | 2 -- .../rasync/test/opal/ImmutabilityAnalysis.scala | 6 ++++-- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/core/src/main/scala/com/phaller/rasync/HandlerPool.scala b/core/src/main/scala/com/phaller/rasync/HandlerPool.scala index c01994d..69063ff 100644 --- a/core/src/main/scala/com/phaller/rasync/HandlerPool.scala +++ b/core/src/main/scala/com/phaller/rasync/HandlerPool.scala @@ -117,20 +117,6 @@ class HandlerPool( p.future } - def whileQuiescentResolveCell[K <: Key[V], V]: Unit = { - while (!cellsNotDone.isEmpty) { - val fut = this.quiescentResolveCell - Await.ready(fut, 15.minutes) - } - } - - def whileQuiescentResolveDefault[K <: Key[V], V]: Unit = { - while (!cellsNotDone.isEmpty) { - val fut = this.quiescentResolveDefaults - Await.ready(fut, 15.minutes) - } - } - /** * Wait for a quiescent state when no more tasks are being executed. Afterwards, it will resolve * unfinished cycles (cSCCs) of cells using the keys resolve function and recursively wait for resolution. diff --git a/core/src/test/scala/com/phaller/rasync/test/LazySuite.scala b/core/src/test/scala/com/phaller/rasync/test/LazySuite.scala index aea7507..67d9d5d 100644 --- a/core/src/test/scala/com/phaller/rasync/test/LazySuite.scala +++ b/core/src/test/scala/com/phaller/rasync/test/LazySuite.scala @@ -4,7 +4,7 @@ package test import java.util.concurrent.CountDownLatch import com.phaller.rasync.lattice.{ DefaultKey, Updater } -import com.phaller.rasync.test.lattice.{ StringIntKey, StringIntUpdater } +import lattice.{ StringIntKey, StringIntUpdater } import org.scalatest.FunSuite import scala.concurrent.Await diff --git a/core/src/test/scala/com/phaller/rasync/test/base.scala b/core/src/test/scala/com/phaller/rasync/test/base.scala index 7f41203..366fb32 100644 --- a/core/src/test/scala/com/phaller/rasync/test/base.scala +++ b/core/src/test/scala/com/phaller/rasync/test/base.scala @@ -1731,7 +1731,6 @@ class BaseSuite extends FunSuite { } // resolve cells - pool.whileQuiescentResolveDefault val fut = pool.quiescentResolveDefaults Await.result(fut, 2.second) latch.await() @@ -1778,7 +1777,6 @@ class BaseSuite extends FunSuite { } // resolve cells - pool.whileQuiescentResolveDefault val fut = pool.quiescentResolveDefaults Await.result(fut, 2.second) latch.await() diff --git a/core/src/test/scala/com/phaller/rasync/test/opal/ImmutabilityAnalysis.scala b/core/src/test/scala/com/phaller/rasync/test/opal/ImmutabilityAnalysis.scala index f8efc71..19d030f 100644 --- a/core/src/test/scala/com/phaller/rasync/test/opal/ImmutabilityAnalysis.scala +++ b/core/src/test/scala/com/phaller/rasync/test/opal/ImmutabilityAnalysis.scala @@ -90,7 +90,8 @@ object ImmutabilityAnalysis extends DefaultOneStepAnalysis { typeImmutabilityAnalysis(project, classFileToObjectTypeCellCompleter, manager, classFile) }) } - pool.whileQuiescentResolveDefault + val fut = pool.quiescentResolveDefaults + Await.ready(fut, 30.minutes) pool.shutdown() val endTime = System.currentTimeMillis @@ -191,7 +192,8 @@ object ImmutabilityAnalysis extends DefaultOneStepAnalysis { typeImmutabilityAnalysis(project, classFileToObjectTypeCellCompleter, manager, classFile) }) } - pool.whileQuiescentResolveCell + val fut = pool.quiescentResolveCell + Await.ready(fut, 30.minutes) pool.shutdown() /* Fixes the results so the output looks good */