How do I execute a blocking piece of code in commo...
# coroutines
b
How do I execute a blocking piece of code in common module with coroutines? In JVM there's
runBlocking {...}
, but I cannot find anything simmilar on common module.
m
We use actual/expect for that. Also we use it only for tests.
d
runBlocking
is only defined on the jvm and native platforms. On JS, there is only one thread, hence it does not exist. You can define common stubs delegating to the platform specific functions
r