From 67065d070d869f5eca01ca7e698afac8ba784e0a Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Wed, 5 Apr 2017 19:50:46 +0200 Subject: Add vulpix docstrings and change defines --- compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala') 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] -- cgit v1.2.3