<@U21LBQBU2> Yes, but it not recommended to do lon...
# coroutines
e
@bj0 Yes, but it not recommended to do long-running blocking operations in
CommonPool
since you don’t know how many threads are there and whether your blocking op will leave any of them.
CommonPool
is better suited for CPU-intensive tasks. So if you have some long-running computation that you don’t want to cary in your UI thread, but need its result in UI, you’ll do:
Copy code
fun compute() = run(CommonPool) { ... computation ... }
// somewhere in UI
launch(UI) { displayResults(compute()) }