O'Reilly logo

Python Parallel Programming Cookbook by Giancarlo Zaccone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Asynchronous Programming

In this chapter, we will cover the following recipes:

  • How to use the concurrent.futures Python module
  • Event loop management with Asyncio
  • Handling coroutines with Asyncio
  • Task manipulation with Asyncio
  • Dealing with Asyncio and Futures

Introduction

With the sequential and parallel execution model, there is a third model, called the asynchronous model, that is of fundamental importance to us along with the concept of event programming. The execution model of asynchronous activities can be implemented using a single stream of main control, both in uniprocessor systems and multiprocessor systems.

In the asynchronous model of a concurrent execution, various tasks intersect with the timeline, and all of this happens under ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required