https://kotlinlang.org logo
#coroutines
Title
# coroutines
e

elaborate tissue

11/12/2019, 5:18 PM
Is it possible to subclass a KClass from java that contains a suspend function? When I try I get given a Continuation object, that I have no idea how to use
g

gildor

11/13/2019, 2:55 PM
Tho it possible in theory, you shouldn't use this approach and try to call suspend function from Java code, instead, provide Java-friendly API, for example create a function that returns CompletableFuture, there are different integration libraries in kotlinx.coroutines
3 Views