I’m rather new to Kotlin. I’m currently working on a platform-independant project, i.e. I’m using a common module and common-js/common-jvm implementations.
I have a class which can be called form multiple threads and has internal state (i.e. several maps).
I’d like to avoid to rewrite that for every target platform.
I can’t use an actor based model as coroutines-common only async/await as far as I can see. I also don’t see another way without adding some abstractions (which I’d like to avoid) to workaround this.
How is concurrency supposed to be handled in common modules?
Are there any recommendations?