Or am I now able to transfer objects between threa...
# kotlin-native
s
Or am I now able to transfer objects between threads? Often times I might want to do several things in the background on a single worker involving several dependencies? Is something like that possible with this threading model?
o
Yes, you can transfer objects between workers. We try to avoid notion of thread, as it is misleading, but workers are executed on top of OS threads.
s
Is there a 1-1 mapping between a worker and an OS thread?
o
Not 1:1, not for every thread there's worker, but for every worker ther is a thread
s
So workers don't share threads?
o
Sure, the whole idea beyond workers is computations offload, if you want to share threads - coroutines are way to go.
s
Can you recommend a sample of kotlin-native coroutines that offload work to background threads?