mirror of https://github.com/sbt/sbt.git
Merge pull request #4194 from veera83372/1.1.x
Fix for #4191 (active.json should be removed on JVM shutdown)
This commit is contained in:
commit
51ee6fc409
|
|
@ -105,11 +105,18 @@ object StandardMain {
|
|||
import scalacache.caffeine._
|
||||
private[sbt] lazy val cache: Cache[Any] = CaffeineCache[Any]
|
||||
|
||||
private[sbt] val shutdownHook = new Thread(new Runnable {
|
||||
def run(): Unit = {
|
||||
exchange.shutdown
|
||||
}
|
||||
})
|
||||
|
||||
def runManaged(s: State): xsbti.MainResult = {
|
||||
val previous = TrapExit.installManager()
|
||||
try {
|
||||
try {
|
||||
try {
|
||||
Runtime.getRuntime.addShutdownHook(shutdownHook)
|
||||
MainLoop.runLogged(s)
|
||||
} finally exchange.shutdown
|
||||
} finally DefaultBackgroundJobService.backgroundJobService.shutdown()
|
||||
|
|
|
|||
Loading…
Reference in New Issue