Skip to content

Commit

Permalink
Await threads termination
Browse files Browse the repository at this point in the history
  • Loading branch information
pkukielka committed Jun 6, 2018
1 parent 4378e54 commit 4730ced
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/compiler/scala/tools/nsc/Global.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package nsc
import java.io.{File, FileNotFoundException, IOException}
import java.net.URL
import java.nio.charset.{Charset, CharsetDecoder, IllegalCharsetNameException, UnsupportedCharsetException}
import java.util.concurrent.TimeUnit

import scala.collection.{immutable, mutable}
import io.{AbstractFile, Path, SourceReader}
Expand Down Expand Up @@ -445,7 +446,9 @@ class Global(var currentSettings: Settings, reporter0: Reporter)
_synchronizeNames = false

ec match {
case ecxs: ExecutionContextExecutorService => ecxs.shutdown()
case ecxs: ExecutionContextExecutorService =>
ecxs.shutdown()
assert(ecxs.awaitTermination(1, TimeUnit.MINUTES))
case _ =>
}
}
Expand Down

0 comments on commit 4730ced

Please sign in to comment.