//clika-runtime/io.clika.runtime/onComplete
onComplete
[jvm]
fun Tensor.onComplete(callback: TensorCallback)
Register callback to run once this tensor's producer has finished (the moment the tensor becomes available; a tensor that is already available fires it right away). Non-consuming: this tensor stays the caller's.
val latch = CountDownLatch(1)
x.onComplete { result -> println(result.summary()); latch.countDown() }
latch.await()