3 ms·
I find this has worked well for me when I can easily state what thread pool work gets executed on.
by klysm 3y ago
I find this has worked well for me when I can easily state what thread pool work gets executed on.
- mmis1000 3y agoI think its kotlin's model. The language don't have a default co-routine executor set, you need to provide your own or spawn one with the std. It can be thread-pooled, single thread, or custom one but there isn't a default one set. If you use single threaded executor, then race condition won't happen. If you choose pooled, then you obviously should realize there can be a race condition. It's all about choice you made.