suspendSupplier

fun <R> suspendSupplier(isRunWithInterruptible: Boolean = true, function: Supplier<R>): suspend () -> R

Kotlin api:

fun foo(block: suspend () -> T) {  }

Use it in Java:

foo(Lambdas.suspendSupplier(() -> new T()));
foo(Lambdas.suspendSupplier(T::new));