Abstract
Context managers provide a convenient API to govern a runtime context. They expose the ability to hook into entering the context manager scope and exit it. Given that asyncio extends the language with the possibility of execution suspension, it becomes evident that a synchronous context manager cannot interface with the event loop in a seamless fashion.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Mohamed Mustapha Tahrioui
About this chapter
Cite this chapter
Tahrioui, M.M. (2019). Working with Async Context Manager. In: asyncio Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4401-2_5
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4401-2_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4400-5
Online ISBN: 978-1-4842-4401-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)