CLOVIS
11/13/2026, 4:05 PMStructuredTaskScope.open<Unit>().use {
it.fork { foo2() }
}
because fork has two overloads, Callable and Runnable , which both have the signature () -> Unit in Kotlin (but have different signatures in Java because void is special)
The simplest code I’ve managed to write is
StructuredTaskScope.open<Unit>().use {
it.fork(Callable { foo2() })
}
I wonder if there is simpler?Marat Akhin
11/13/2026, 4:58 PMCLOVIS
11/13/2026, 5:03 PMWout Werkman
11/13/2026, 9:16 PM