<Can a coroutine suspend and then resume on a diff...
# stackoverflow
u
Can a coroutine suspend and then resume on a different thread? Are the memory effects of the first thread carried to the second thread? Consider fun main(args: Array) { runBlocking { launch(Dispatchers.Default) { var a = 0 a++ delay(100) println(a) } } } Since the Dispatcher has multiple threads, is it possible for the program to change threads at the suspending delay function? Is it guaranteed that it will print '1' or does a need to be AtomicInteger?