This talk introduces coroutines – a powerful control flow mechanism for cooperative multitasking. I will review the historical origin of coroutines and show how they can be used to elegantly solve real-world problems: from parsing to UNIX scripting, and how they find application in modern programming languages embodied as generators, goroutines and streams.
What makes coroutines different from threads and processes? How to implement them? When and why you should use them? To answer these questions I will discuss the implementation of a functional stream processing library and analyse the involved trade-offs.
This talk is given by Rizo Isrof (https://twitter.com/rizo_isrof), an engineer at Pusher.