But is not what I was expecting, they should run s...
# announcements
d
But is not what I was expecting, they should run sequentially… since they are using the same thread
k
What? No, what would be the point then?
b
Using a single thread context is useful for sharing state between coroutines without synchronization. If you need the code to run in sequence you can just ... run it in sequence.
o
You can easily imaging how it works if you divide program on suspension points. All the code in-between is callabacks and you schedule this callbacks to one-threaded executor. So each delay works not as a sleep, but rather, a schedule. Having one thread here doesn't play any role on how it is executed.