Welcome to the asyncio-taskpool documentation!

asyncio-taskpool is a Python library for dynamically and conveniently managing pools of asyncio tasks.

Purpose

A task is a very powerful tool of concurrency in the Python world. Since concurrency always implies doing more than one thing at a time, you rarely deal with just one Task instance. However, managing multiple tasks can become a bit cumbersome quickly, as their number increases. Moreover, especially in long-running code, you may find it useful (or even necessary) to dynamically adjust the extent to which the work is distributed, i.e. increase or decrease the number of tasks.

With that in mind, this library aims to provide two things:

  1. An additional layer of abstraction and convenience for managing multiple tasks.

  2. A simple interface for dynamically adding and removing tasks when a program is already running.

The first is achieved through the concept of a task pool. The second is achieved by adding a control server to the task pool.

Installation

$ pip install asyncio-taskpool

Contents

Indices and tables