Hi! I can see that `runBlocking` is not available ...
# multiplatform
d
Hi! I can see that
runBlocking
is not available for common code. But what If I legitimately want to block until coroutine completes? For example I have a ktor websocket and I want to wait until it disconnects before exiting the app. What do people do? Should I create expect/actual runBlocking?
👌 1
j
I've had to use
runBlocking
to work around particular issue ktor has right now (when using
1.3.5-native-mt
coroutines).....have used expect/actual for that
d
I see, thanks! Will try that then.
j
made that change to repo here in following commit fwiw https://github.com/joreilly/PeopleInSpace/commit/eb3fb4f76c789570ef71469a5c410da95a711163 (lots of other stuff in there but you can search for "runBlocking")
👍 1