Async Task Tools

Pipeline status Coverage status Documentation status Current release

tasktools provides a small set of asyncio-oriented primitives for building long-running, callback-driven background loops.

The central piece is TaskLoop, which re-schedules the same coroutine through done_callback after each iteration. On top of that, the project also exposes helper layers for task assignment, worker slot scheduling, and async-friendly process queues.

Callback-driven task loop

Visual Model

The project is built around a callback-driven loop: one task finishes, its callback evaluates the result, and the next task is scheduled from there.

What You Can Do With It

  • Run a coroutine repeatedly without writing a manual loop controller.

  • Pause, continue, stop, or cancel a background task explicitly.

  • Assign work dynamically into scheduler-managed task slots.

  • Use a callback-driven model where each completed task decides the next step.

Current Release

The current release line is 1.3.x.

The latest release is 1.3.2.

The 1.3.x line focuses on:

  • stabilizing the original done_callback control model

  • aligning runtime behavior and documentation

  • hardening scheduler and assignator paths

  • adding a larger automated test suite and coverage validation

Start Here

If you are evaluating the project for the first time, the fastest path is:

  1. read the release summary in Release Notes

  2. try the small examples in Examples

  3. then move to Why we need an Async While? for the callback model details

Useful Entry Points

Fast Navigation

Quick Validation

Local checks used for release validation:

python -m unittest discover -s test
python -m coverage run -m unittest discover -s test
python -m coverage report -m

At release preparation time, project coverage is around 94%.

Indices and tables