Hi Folks, I’m currently running into an issue whil...
# coroutines
t
Hi Folks, I’m currently running into an issue while bootstrapping my application. While initializing an object, I would like to create indices in my mongodb collection. When using the following snippet:
Copy code
runBlocking {
            collection.createIndexes(indexes)
}
I keep get issues because the
awaitSingle()
(which is inside the
createIndexes(...)
) is being stopped, and no value is being returned. Any help there?
n
Are you perhaps running this code on a thread used for coroutine dispatch. runBlocking can prevent other coroutines from running because, well, it's blocking.