Add type annotation for shutdown hooks

Intellij couldn't handle this without an annotation.
This commit is contained in:
Ethan Atkins 2019-12-10 10:37:14 -08:00
parent 0d1d8a790c
commit 38a56358dc
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ private[sbt] object ShutdownHooks extends AutoCloseable {
() => Option(hooks.remove(id)).foreach(_.apply())
}
private def runAll(): Unit = if (ranHooks.compareAndSet(false, true)) {
hooks.forEachValue(runtime.availableProcessors.toLong, _.apply())
hooks.forEachValue(runtime.availableProcessors.toLong, (_: () => Unit).apply())
}
override def close(): Unit = {
runtime.removeShutdownHook(thread)