© Mohamed Mustapha Tahrioui 2019
M. M. Tahriouiasyncio Recipeshttps://doi.org/10.1007/978-1-4842-4401-2_6

6. Communication Between Asyncio Components

Mohamed Mustapha Tahrioui1 
Darmstadt, Hessen, Germany
In the previous chapters, we learned about asynchronous interfaces to standard library components (or even completely new APIs) that, in the broader sense, keep shareable state/context or are “runnable”. This includes:
  • Coroutines

  • Tasks

  • Async generators

  • Async context managers

  • Async comprehensions

  • Subprocesses

These components might need to share their state with other instances of asyncio components. Examples where this makes sense include:
  • Coroutine workers

  • State-machine or state-keeping coroutines, such as an audio player (playing/paused/idle) ...

Get asyncio Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.