What Python implementation is known for its support for microthreads (tasklets)?

The story behind the answer

The Python implementation known for supporting microthreads, including tasklets, is Stackless Python.

Stackless Python is an alternative Python implementation designed to reduce reliance on the C call stack. Its signature feature is microthreading: lightweight, interpreter-managed units of execution that can switch cooperatively without the overhead of ordinary operating-system threads. Tasklets represent these independently scheduled execution paths, while channels provide a way for them to communicate.

The name can cause confusion. Stackless Python does not literally eliminate every use of a stack, nor does it automatically provide parallel execution across CPU cores. Its microthreads generally share one interpreter and use cooperative multitasking, so a tasklet must yield control for another tasklet to run. This makes the system useful for highly concurrent workloads, simulations, and game-style logic, although modern asynchronous programming tools often serve similar purposes. Stackless also added coroutines and task serialization, making it more than simply a modified CPython build.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: