Merge pull request #5288 from eatkins/shutdown-hook-type-annotation

Add type annotation for shutdown hooks
This commit is contained in:
eugene yokota 2019-12-10 15:22:48 -05:00 committed by GitHub
commit f0d1e075db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)