You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
synchronized is a JVM-only API in Kotlin and as far as we know, there are no plans to change that.
synchronized is used in StreetComplete in many places in the data layer. The data layer is architecture-wise a blocking API (i.e. no coroutines, no suspending functions) and hence we can't use Mutex for threadsafe locks. (Let's not preclude that we refactor the data layer one day to be coroutine-based although it would be a considerable effort, but for now:)
We need a multiplatform replacement for synchronized. The most obvious choice is the official kotlinx-atomicfu, which is however still marked as experimental, especially the locks.
So, while there are other things to do in preparation of #5412, it might be better to hold off towards (at least) merging a PR that implements this (because according to one maintainer of kotlinx-atomicfu, they are working towards stabilization)
The text was updated successfully, but these errors were encountered:
Note that kotlinx-atomicfu's API is marked as having an unstable API, i.e. may change from release to release. The functionality of the library itself can be considered stable, though, it is used by other core kotlinx libraries.
I read somewhere that the maintainer(s) are working on stabilizing the API. So, it may be worth on holding off on this while there are other things to do.
synchronized
is a JVM-only API in Kotlin and as far as we know, there are no plans to change that.synchronized
is used in StreetComplete in many places in the data layer. The data layer is architecture-wise a blocking API (i.e. no coroutines, no suspending functions) and hence we can't useMutex
for threadsafe locks. (Let's not preclude that we refactor the data layer one day to be coroutine-based although it would be a considerable effort, but for now:)We need a multiplatform replacement for
synchronized
. The most obvious choice is the officialkotlinx-atomicfu
, which is however still marked as experimental, especially the locks.So, while there are other things to do in preparation of #5412, it might be better to hold off towards (at least) merging a PR that implements this (because according to one maintainer of
kotlinx-atomicfu
, they are working towards stabilization)The text was updated successfully, but these errors were encountered: