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…
Async tasks in 350 lines of C launched on March 11, 2024 with 146 votes, #384 of 4,270 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 2 years on.
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
Header-only library for asynchronous tasks in C. Contribute to rkaehn/cr_task.h development by creating an account on GitHub.
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…
Does a similar job
all alternatives →
Asyncpal: Preemptive concurrency and parallelism for sporadic workloads2024 · github.com · ▲28Hi HN ! Alex here. I'm excited to show you Asyncpal (https://github.com/pyrustic/asyncpal), a Python library for parallelism [1] and preemptive concurrency [2] tailored for sporadic workloads [3]. I've been working on a private project where it would be convenient to have asynchronous versions of some operations without using `async/await` [4]. Besides `async/await`, which represents cooperative concurrency via the `asyncio` package, Python also provides preemptive concurrency through its `threading` package. Additionally, the `concurrent.futures` package builds…
Bringing multithreading to Python's async event loop2024 · github.com · ▲82This project explores the integration of multithreading into the asyncio event loop in Python. While this was initially built with enhancing CPU utilization for FastAPI servers in mind, the approach can be used with more general async programs too. If you’re interested in diving deeper into the details, I’ve written a blog post about it here: https://www.neilbotelho.com/blog/multithreaded-async.html
Neco – Coroutine Library for C2024 · github.com · ▲145Concurrency library for C (coroutines). Contribute to tidwall/neco development by creating an account on GitHub.

- UCuThreads – Concurrent User Threads in C and C++2016 · samanbarghi.com · ▲135
More work this month
the category →
Endless lofi beats composed live in your browser, over pixel-art nights in Paris, Tokyo, New York, Hong Kong, Sydney, San Francisco and more. Free, no sign-up.
Work · 25d ago · loficities.com
Smooth Recorder▲257Mac screen recordings that look edited when you hit stop
Work · 19d ago · smoothrecorder.com


Work · 14d ago · readrare.com
Source: Show HN post ↗ · launch text quoted in part
Launched alongside, March 2024
the whole month →

🌐 The Internet Computer! Free, Open-Source, and Self-Hostable. - HeyPuter/puter
Dev tools · 2024 · github.com
Microlaunch▲1,115Launch and get feedback on both the idea and product
Dev tools · 2024 · microlaunch.net


