Greenlettask2
Greenlettask2 is a lightweight concurrency framework designed to coordinate multiple lightweight tasks within a single process using cooperative multitasking. The project follows a greenlet-inspired model, where tasks yield control to a central scheduler rather than relying on preemptive threading. This approach aims to provide predictable scheduling and low memory overhead for environments with limited resources.
At its core, greenlettask2 defines tasks as callables or coroutines that can yield execution to the scheduler.
Features include a minimal API surface for task creation, cancellation tokens, timeout handling, task-local storage, and
Greenlettask2 originated as an open-source continuation of earlier lightweight-concurrency experiments. It targets use cases where traditional
Limitations include reliance on cooperative yields being honored by tasks, potential difficulty in debugging complex task
See also: Greenlet, asyncio, cooperative multitasking, micro-threading.