All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.p8e.client.Extensions.kt Maven / Gradle / Ivy

Go to download

A collection of services and libraries that iteract and run Provenance Java based contracts.

There is a newer version: 0.9.0-grpc
Show newest version
package io.p8e.client

import kotlin.concurrent.thread

fun shutdownHook(fn: () -> Unit) {
    Runtime.getRuntime().addShutdownHook(thread(start = false, block = fn))
}

internal fun  T.closeOnShutdown() = apply { shutdownHook { close() } }







© 2015 - 2025 Weber Informatics LLC | Privacy Policy