Workers is essentially the only way to run some op...
# kotlin-native
g
Workers is essentially the only way to run some operation on another thread which is available on K/N (without usage of pthread and other platform specific features, so it’s the only common way to do that), kotlinx.coroutines not even released with support of concurrency, it’s under active development I don’t see how it can be compareed, and it’s a separate library, after all
n
You can do concurrency with KotlinX Coroutines with the limited number of Kotlin Native targets that are supported (one of the supported targets is linuxX64).
Is there a basic Worker example (not mobile related) available that covers running multiple tasks in parallel?
g
Yes, you can, but it not even released for K/N, right?
If you do not get any parallelism for Arm32Hfp it probably not supported, so fallback to single thread execution, I would just create an issue/feature request on Kotlin tracker
n
How would I be able to tell if the linuxArm32Hfp has multi-threading support?
g
what do you mean? I though that you tried worker and it executes on the main thread on arm32hfp, isn’t it?
t
@napperley while there is coroutines support on some native targets, it is essentially single threaded, since coroutine internals can not handle freezing (yet). You would also have to write your own dispatcher.