Hey guys what is the difference between of runbloc...
# multiplatform
v
Hey guys what is the difference between of runblocking and suspend function in KMM ?
b
Runblocking blocks a current thread until all the work inside the lambda completes. Suspending function does not block the thread and can reuse a single thread to resolve multiple suspending functions concurrently
runblocking should only be ever used to enter the coroutine scope and even then there usually are better ways to do it.
1
g
Also runBlocking is JVM and not multiplatform.
v
Great thank you guys