https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

darkmoon_uk

09/19/2019, 8:23 AM
I might just define a my own
expect synchronized
for now and alias it to the JVM implementation for Android, for iOS just pass through in the knowledge that its coroutines are single threaded anyway.
t

thana

09/19/2019, 10:14 AM
i was told that's the way to go when i asked pretty mcih the same question a few months ago
btw you can use kotlins
syncrhonized
when implementing the `actual`s on js and jvm - it's only deprecated on
common
k

kpgalligan

09/19/2019, 3:20 PM
I wrote Stately and can speak to this. If you know for sure that only one thread will access the
synchronized
block, it should be OK, but my immediate question would be why do you need it at all? Why is iOS OK doing everything on the main thread but JVM isn’t?
3 Views