mirror of https://github.com/sbt/sbt.git
Add type annotation for shutdown hooks
Intellij couldn't handle this without an annotation.
This commit is contained in:
parent
0d1d8a790c
commit
38a56358dc
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue