Recap
Thunks: remove time as state complexity.
Promises:
Generators:
Observables: adapt to event based
CSP go-routines:
A Tale of Three Lists A kind of TODO MVC for asynchronous programming
GitHub.com/getify/a-tale-of-three-lists
There's a producer that's outputting messages every few hundred milliseconds. There are two listeners that get these messages at different rates (messages/second).
Then you can take from any list and put messages to third list.
And pause the message listeners. if both consumers are paused it (the producers) stops as well.
Pretty complex demo, to better show the differences