can someone explain to me the underlying mechanism...
# coroutines
k
can someone explain to me the underlying mechanism which tells dispatchers what coroutines are ready to be resumed? Is it some sort of queue?
l
It depends on the dispatcher implementation. Usually, it is a queue, yes.
k
do you know of any further reading I can do on this? I want to really understand how this work under the hood
l
If you really want to understand how it works under the hood, your best option is to go into the hood, starting by cloning this repository: https://github.com/Kotlin/kotlinx.coroutines
b
This video explains it:

https://www.youtube.com/watch?v=W2dOOBN1OQI

g
This video mostly about lock-free algorithms, not so related to dispatcher implementation