nowfound

Work · March 11, 2024

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.

Visit github.com ↗Alternativestop 9% of March 2024

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 →
  • Minutes2023 · minutes.so · ▲398

    Make your meetings async with voice and video

  • Asyncpal: Preemptive concurrency and parallelism for sporadic workloads2024 · github.com · ▲28

    Hi 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 · ▲82

    This 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 · ▲145

    Concurrency library for C (coroutines). Contribute to tidwall/neco development by creating an account on GitHub.

  • OneCal2022 · onecal.io · ▲323

    Synchronize your calendars in real-time

  • UC
    uThreads – Concurrent User Threads in C and C++2016 · samanbarghi.com · ▲135

More work this month

the category →

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, March 2024

the whole month →
  • Dub.co▲1,475

    Short links with superpowers

    Dev tools · 2024 · dub.co

  • 🌐 The Internet Computer! Free, Open-Source, and Self-Hostable. - HeyPuter/puter

    Dev tools · 2024 · github.com

  • Microlaunch▲1,115

    Launch and get feedback on both the idea and product

    Dev tools · 2024 · microlaunch.net

  • Milestone▲1,113

    Interactive, gamified product tours for SaaS

    Growth · 2024 · milestoneflow.io

  • Hunted Space▲1,004

    Insights on Product Hunt launches

    Growth · 2024 · hunted.space

  • Creatie▲850

    The one-stop product design tool amplified by AI

    AI · 2024 · creatie.ai