<@U0BHTDH55> The whole point of coroutines is to d...
# eap
e
@pawel_byszewski The whole point of coroutines is to disengage your computation from threads. In the code above
await(…)
is a suspending function defined in Kovenant library. When you invoke a suspending function your computation gets suspended and the thread it was running on is free to do any other stuff. The implementation of a particular suspending function decides on how and when your computation is resumed. This particular library (Kovenant) is multi-threaded (it has multiple threads to resume your code). If you are looking for Node.JS style execution where everything works in the same thread, you’ll have to write (or find) a library that schedules everything into the single thread. Kotlin standard library provides all the necessary building blocks, so that writing such single-threaded coroutine library is straighforward.