kotlinx.coroutines icon indicating copy to clipboard operation
kotlinx.coroutines copied to clipboard

runBlocking doesnt block Main thread on iOS

Open slipdef opened this issue 9 months ago • 1 comments
trafficstars

We used to use our custom implementation to run some important cleaning procedure on applicationWillTerminate event on iOS. The procedure requires suspend func invocation, so we use custom runblocking that uses NSRunLoop.mainRunLoop inside. I noticed that coroutines in latest versions provides own impl of runBlocking for Native. The test reveals that it doesnt block the thread (MainThread) in applicationWillTerminate.

slipdef avatar Feb 07 '25 13:02 slipdef