3 ms·
Really? How do you call Kotlin co-routines from Java code without wrapper types?
by pjmlp 2y ago
Really?
How do you call Kotlin co-routines from Java code without wrapper types?
- syspec 2y agoSuspend functions appear as regular JVM methods with an extra Continuation parameter. Tools like runBlocking make them straightforward to call from Java. My main point was that you can use Java code as is without modifications from Kotlin, and that if you wanted you could have Java code in your project and it will work just fine. Of course if you wanna start calling co-routines from the Java part of your project to the Kotlin part, hey that's up to you.