我是Kotlin协程的新手,我需要知道Kotlin协程如何在内部管理其线程工作。
Does it uses separate thread for each task ?
Does kotlin coroutine stays in the same process where the application live ?
Does kotlin coroutine change the process during any intermediate task ?
最佳答案
据我所知,Coroutine使用线程池来运行任务。
因此,可以说,Coroutine用户的观点是,每个任务将在单独的线程上运行,但是在后台,它只是一个线程池。
对于这个过程,是的。它与应用程序的处理过程相同。
关于android - Kotlin协程是否在应用程序所在的进程中运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62080621/