Course details

Python Concurrent Programming: Asynchronous Executions in Python

Python Concurrent Programming: Asynchronous Executions in Python


Overview/Description
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description

This 9-video course offers a lab-only exploration and introduction to the libraries available in Python to run tasks asynchronously by using both processes and threads. To take this course, you should have prior knowledge of how to spawn and manage processes in Python. First, you will learn how to significantly improve the performance and responsiveness of your application by running them concurrently, then learn how to create a process pool, and how to use multiprocessing to execute tasks in parallel. Next, you will learn to use multithreading to run chunks of a task at one time, and to switch between the chunks regularly. Learners will then examine the concurrent.futures module, which contains objects to run threads and processes in an asynchronous manner, and to monitor their progress while they are still executing. Continue by learning how to use ThreadPoolExecutor, available in the concurrent.futures module. Finally, you examine the asyncio module in Python, which provides lightweight mechanisms for asynchronous executions of tasks.



Expected Duration (hours)
1.0

Lesson Objectives

Python Concurrent Programming: Asynchronous Executions in Python

  • discover the key concepts covered in this course
  • create a pool of processes to which tasks can be submitted
  • use the map function of a multithreading.Pool instance to submit multiple tasks to a process pool
  • recognize the use of futures objects to execute tasks asynchronously
  • compare the performance of process pools and thread pools for tasks that are network-bound
  • compare the performance of process pools and thread pools for tasks which are CPU-bound
  • create and execute a coroutine using the asyncio module
  • use the run, create_task, and gather functions in the asyncio modules to execute tasks
  • summarize process pools and contrast multithreading and multiprocessing in Python
  • Course Number:
    it_pymcpydj_04_enus

    Expertise Level
    Beginner