Other concurrency and asynchronous patterns
There are some other concurrency and asynchronous patterns developers may use. We can cite the following:
- The Actor model: A conceptual model to deal with concurrent computation. It defines some rules for how actor instances should behave: an actor can make local decisions, create more actors, send more messages, and determine how to respond to the next message received.
- Coroutines: General control structures where flow control is cooperatively passed between two different routines without returning. Coroutines facilitate asynchronous programming by allowing execution to be suspended and resumed. As we have seen in one of our examples, Python has coroutines built in (via the
asyncio
library). - Message passing: Used in parallel computing, object-oriented programming (OOP), and inter-process communication (IPC), where software entities communicate and coordinate their actions by passing messages to each other.
- Backpressure...