Async tasks in 350 lines of C
Tasks are a primitive for asynchronous programming and an alternative to working with threads directly. Instead of creating a thread, performing work, then waiting on it using synchronization primitives, you only define a unit of work and let a scheduler decide when and where to execute it. The threads that the scheduler uses are created once and reused for many tasks throughout the program's lifetime. In most cases, creating and executing a task requires not even a single syscall and is a significantly faster operation than creating a thread, resulting in lower latency. Furthermore, tasks…
In plain words
This C library provides a lightweight task scheduler for asynchronous programming, offering an alternative to manual thread management. Instead of creating individual threads, developers define units of work that a scheduler executes across a reusable thread pool. Tasks incur minimal overhead—often no system calls—making them faster than thread creation with lower latency. The scheduler automatically interleaves tasks from different subsystems, simplifying concurrent code. Written in standard C11 with only POSIX dependencies, it integrates easily into existing projects.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
Tasks are a primitive for asynchronous programming and an alternative to working with threads directly. Instead of creating a thread, performing work, then waiting on it using synchronization primitives, you only define a unit of work and let a scheduler decide when and where to execute it. The threads that the scheduler uses are created once and reused for many tasks throughout the program's lifetime. In most cases, creating and executing a task requires not even a single syscall and is a significantly faster operation than creating a thread, resulting in lower latency. Furthermore, tasks from different subsystems can be automatically interleaved by the scheduler, which is difficult to achieve manually with threads without communication between the subsystems. The library is written in standard C11 and only depends on the C POSIX library. It is designed to be easy to integrate into a project by just copying the header and simple enough to be understood in an afternoon.
More work this month
the category →


The app store for voice native apps that lives in your notch
Work · 28d ago · voiceos.com

The New Calendly▲211Handle all of the work before, during, and after meetings
Work · 17d ago · calendly.com
Launched alongside, March 2024
the whole month →
- 3Y
Life & fun · 2024 · github.com
Microlaunch▲1,116Launch and get feedback on both the idea and product
Dev tools · 2024 · microlaunch.net


