Patrick Ramsey
03/03/2021, 3:04 AMdeferToThread()
? IE, a neat, packaged way to spawn a thread/run some blocking work on a thread pool, and monitor it from a coroutine which resumes the caller when the blocking code finishes?Patrick Ramsey
03/03/2021, 3:08 AMPatrick Ramsey
03/03/2021, 3:08 AMwithContext(<http://Dispatchers.IO|Dispatchers.IO>) {
someBlockingOperation()
}
Patrick Ramsey
03/03/2021, 3:08 AMrnett
03/03/2021, 3:16 AMasync
if you want to start a new coroutine, but it's Dispatchers.IO, yeah.Patrick Ramsey
03/03/2021, 4:28 AM