Is there a way to add suspended functions in processing Queue (or similar).
I have use case where I am getting different callbacks that updates same entity in database. Instead of execute suspended functions async, I want to execute them in same order that callback was received. Is there a way to do it?
Zach Klippenstein (he/him) [MOD]
03/04/2020, 5:45 PM
Sounds like you could make a
Channel<suspend () -> Unit>(UNLIMITED)
and launch a coroutine to read from the channel and invoke the functions one-at-a-time.