//clika-runtime/io.clika.runtime/VoidCallback
VoidCallback
[jvm]
fun interface VoidCallback
A callback with no payload: the deleter of a wrapped buffer (Tensors.fromBlob / Tensors.fromBlobStrided). The runtime runs it exactly once, when the last reference to the wrapping tensor drops, on whichever thread that happens; the callback already holds the buffer it is being told to release, so nothing is passed.
val adopted = Tensors.fromBlob(buf, longArrayOf(8), deleter = VoidCallback {
println("buffer released")
})
An exception the callback lets escape is handed to the calling thread's uncaught-exception handler (the JVM's own reporting path) and never reaches the runtime.
Functions
| Name | Summary |
|---|---|
| run | [jvm] abstract fun run() |