Hey all, so I've just started using 1.3.9-native-m...
# coroutines
b
Hey all, so I've just started using 1.3.9-native-mt on iOS/native and I'm getting concurrency/freezing exceptions on code that would otherwise run correctly on the JVM. Is there a simple way to fix this code? Can I just force everything to run on the main thread?
l
Can you make a small reproducing snippet of your issue?
b
This test works correctly on the JVM. But in iOSX64/native the
results
structure always gets frozen. In the JVM I can manage the shared structure manually using
Mutex
, but native never even gives the chance to do this. (And want to try and avoid complicated solutions like Stately)
l
It's because you're using
GlobalScope
. Try just using the existing scope by removing
GlobalScope.
before the
async
calls @bsimmons.
b
Oh sweet, that fixes it. Great thanks.