aleksey.tomin
10/29/2020, 5:45 AMval ctx1 = newSingleThreadContext("run1")
launch(ctx1) {
run1()
}
val ctx2 = newSingleThreadContext("run2")
launch(ctx2) {
run2()
}
But I’ve found that different logics in different contexts can’t work in same time - when I turn off run2 feature - run1 works faster.
How can I run some code (with coroutines support) in another thread?
PS: run1 - ktor/curl client, run2 - file operations.
PPS: I’ll migrate to serialization 1.0.1 today but (I think) it doesn’t matter.aleksey.tomin
10/29/2020, 6:55 AMntherning
10/29/2020, 7:10 AMmalloc()
) but I'm not sure it will show you Kotlin Native allocations as it might be using a custom allocator.