aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-04-05 19:50:46 +0200
committerFelix Mulder <felix.mulder@gmail.com>2017-04-12 11:31:14 +0200
commit67065d070d869f5eca01ca7e698afac8ba784e0a (patch)
treed20591a837a37f9be5932fca373cfc41f7d48e64 /compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala
parent0ee99771cf12c059f79ef0b9eb7b6e2bd09da942 (diff)
downloaddotty-67065d070d869f5eca01ca7e698afac8ba784e0a.tar.gz
dotty-67065d070d869f5eca01ca7e698afac8ba784e0a.tar.bz2
dotty-67065d070d869f5eca01ca7e698afac8ba784e0a.zip
Add vulpix docstrings and change defines
Diffstat (limited to 'compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala')
-rw-r--r--compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala13
1 files changed, 11 insertions, 2 deletions
diff --git a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala
index 22bebf714..476012d1d 100644
--- a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala
+++ b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala
@@ -47,7 +47,14 @@ trait RunnerOrchestration {
private[this] val monitor = new RunnerMonitor
- /** Look away now, sweet child of summer */
+ /** The runner monitor object keeps track of child JVM processes by keeping
+ * them in two structures - one for free, and one for busy children.
+ *
+ * When a user calls `runMain` the monitor makes takes a free JVM and blocks
+ * until the run is complete - or `maxDuration` has passed. It then performs
+ * cleanup by returning the used JVM to the free list, or respawning it if
+ * it died
+ */
private class RunnerMonitor {
def runMain(classPath: String): Status = withRunner(_.runMain(classPath))
@@ -128,6 +135,9 @@ trait RunnerOrchestration {
}
}
+ /** Create a process which has the classpath of the `ChildJVMMain` and the
+ * scala library.
+ */
private def createProcess: Process = {
val sep = sys.props("file.separator")
val cp =
@@ -142,7 +152,6 @@ trait RunnerOrchestration {
}
private[this] val allRunners = List.fill(numberOfSlaves)(new Runner(createProcess))
-
private[this] val freeRunners = mutable.Queue(allRunners: _*)
private[this] val busyRunners = mutable.Set.empty[Runner]