Can I take advantage of Kotlin's Coroutines by using them in Java code?
问题 What's my goal? My goal is to be able to use Kotlin's Coroutine system from Java. I want to be able to pause mid-execution for a given amount of time, and then pick back up at that spot after the given amount of time has passed. From Java, I'd like to be able to execute tasks that allow pausing mid-execution without in an asynchronous fashion, such as: //example 1 someLogic(); pause(3000L); //3 seconds someMoreLogic(); //example 2 while(true) { someContinuedLogic(); pause(10000L); //10