Skip to Content
Python Concurrency with asyncio
book

Python Concurrency with asyncio

by Matthew Fowler
February 2022
Intermediate to advanced
376 pages
10h 54m
English
Manning Publications
Content preview from Python Concurrency with asyncio

14 Advanced asyncio

This chapter covers

  • Designing APIs for both coroutines and functions
  • Coroutine context locals
  • Yielding to the event loop
  • Using different event loop implementations
  • The relationship between coroutines and generators
  • Creating your own event loop with custom awaitables

We’ve learned the vast majority of what asyncio has to offer. Using the modules of asyncio covered in previous chapters, you should be able to complete almost any task you need. That said, there are still a few lesser-known techniques that you may need to use, especially if you’re designing your own asyncio APIs.

In this chapter, we’ll learn a smorgasbord of more advanced techniques available in asyncio. We’ll learn how to design APIs that can handle both coroutines ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Testing with pytest

Python Testing with pytest

Brian Okken
Python for DevOps

Python for DevOps

Noah Gift, Kennedy Behrman, Alfredo Deza, Grig Gheorghiu

Publisher Resources

ISBN: 9781617298660Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link