nowfound

Dev tools · September 28, 2024

Bringing multithreading to Python's async event loop

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

Bringing multithreading to Python's async event loop launched on September 28, 2024 with 82 votes, #522 of 5,281 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 2 years on.

Visit github.com ↗Alternativestop 10% of September 2024

In plain words

This project integrates multithreading into Python's asyncio event loop to improve CPU utilization in async programs. Originally designed to enhance FastAPI server performance, the approach applies broadly to general async applications. It addresses the limitation of Python's single-threaded event loop by combining multithreading capabilities, allowing developers to better utilize multi-core processors while maintaining async programming patterns.

written from the facts on this page · September 2026

From the sources

A multithreaded async event loop for python. Contribute to NeilBotelho/turboAsync development by creating an account on GitHub.

Does a similar job

all alternatives →
  • Parallelise pipelines of Python async iterables2020 · github.com · ▲71

    Utility function to parallelise pipelines of Python asyncio iterators/generators - michalc/asyncio-buffered-pipeline

  • 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…

  • WebRTC implementation for Python using Asyncio2018 · github.com · ▲216

    WebRTC and ORTC implementation for Python using asyncio - jlaine/aiortc

  • HTTP/2 Python-Asyncio Web Microframework2018 · gitlab.com · ▲173
  • Async tasks in 350 lines of C2024 · github.com · ▲146

    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…

  • Faster FastAPI with simdjson and io_uring on Linux 5.192023 · github.com · ▲290

    A few months ago, I benchmarked FastAPI on an i9 MacBook Pro. I couldn't believe my eyes. A primary REST endpoint to `sum` two integers took 6 milliseconds to evaluate. It is okay if you are targeting a server in another city, but it should be less when your client and server apps are running on the same machine. FastAPI would have bottleneck-ed the inference of our lightweight UForm neural networks recently trending on HN under the title "Beating OpenAI CLIP with 100x less data and compute". (Thank you all for the kind words!) So I wrote another library. It has been a while since I have…

More dev tools this month

the category →
  • /dev/null▲468

    a social network for devs

    Dev tools · 2d ago · dev-null.sh

  • open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.

    Dev tools · 27d ago · github.com

  • Contribute to reladraw/reladraw development by creating an account on GitHub.

    Dev tools · 25d ago · github.com

  • OpenBot▲362

    Grok Bot alternative: free, local, open-source, multiplayer

    Dev tools · 22d ago · openbot.run

  • Talanoa▲340

    Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…

    Dev tools · 20d ago · talanoa.email

  • CoreSpeed▲332

    One MCP for everything your agents need: apps, memory, tools

    Dev tools · 27d ago · corespeed.io

Source: Show HN post ↗

Launched alongside, September 2024

the whole month →
  • Wispr Flow▲2,732

    Speak naturally, write perfectly & 3x faster in every app

    AI · 2024 · wisprflow.ai

  • Pathway▲1,335

    Get user insights 10x faster

    Work · 2024 · wynde.io

  • Personalized AI daily planning that suits your life

    AI · 2024 · beforesunset.ai

  • Osmos▲1,194

    Match with like-minded professionals for 1:1 conversations

    Growth · 2024

  • Carrot Care▲1,168

    Understand & optimise your bloodwork

    Life & fun · 2024 · carrotcare.health

  • Polar▲1,167

    An open source monetization platform for developers

    Dev tools · 2024 · polar.sh