frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

How async/await works in Python (2021)

https://tenthousandmeters.com/blog/python-behind-the-scenes-12-how-asyncawait-works-in-python/
61•sebg•9mo ago

Comments

quentinp•9mo ago
While it stays at the Python level, https://github.com/AndreLouisCaron/a-tale-of-event-loops really helped me to understand how asyncio and Trio are implemented. I had no idea how sleeps worked before reading that post.
incomingpain•9mo ago
Page didnt load for me.

https://realpython.com/async-io-python/

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

punnerud•9mo ago
A more simplified version:

Synchronous code is like a single-lane road where cars (tasks) must travel one after another in perfect sequence. If one car stops for gas (waiting for I/O), every car behind it must stop too. While orderly and predictable, this creates massive traffic jams as tasks wait unnecessarily for others to complete before they can proceed.

Pure asynchronous code (with callbacks) is like dispatching multiple cars onto independent routes with no coordination. Cars move freely without waiting for each other, but they arrive at unpredictable times and following their progress becomes chaotic. It's efficient but creates a complex tangle of paths that becomes hard to maintain.

Async/await combines the best of both approaches with a multi-lane highway system. Cars follow clear, synchronous-looking routes (making code readable), but only wait at strategic "await" exit ramps when truly necessary. When a car needs data, it signals with "await", pulls off the highway temporarily, and other cars continue flowing past. Once its operation completes, it merges back into traffic and continues. This gives you the logical simplicity of synchronous code with the performance benefits of asynchronous execution - cars only wait at crossroads when they must, maximizing throughput while maintaining order.

The genius of async/await is that it lets developers write code that looks sequential while the runtime handles all the complex traffic management under the hood.

explodes•9mo ago
Excellent write up. I appreciate the level of details here showing the history from the days of old, before async/await were even keywords.
bilsbie•9mo ago
How does the GIL come into play here?
punnerud•9mo ago
GIL is like a "red-cap" on the head for the CPU-core running the task, so you would not be able to run true Async without GIL. Have to hand the "red-cap" back, for the next task.

Instead of using a global lock ("red-cap"), Python objects have introduced a specialized reference counting system that distinguishes between "local" references (owned by a single thread) and "shared" references (accessed by multiple threads).

In that way enabling to remove GIL in the long run, now starting with making it optional.

I built Timeframe, our family e-paper dashboard

https://hawksley.org/2026/02/17/timeframe.html
875•saeedesmaili•11h ago•218 comments

The JavaScript Oxidation Compiler

https://oxc.rs/
81•modinfo•3h ago•18 comments

Loops is a federated, open-source TikTok

https://joinloops.org/
344•Gooblebrai•11h ago•192 comments

Show HN: CIA World Factbook Archive (1990–2025), searchable and exportable

https://cia-factbook-archive.fly.dev/
237•MilkMp•9h ago•58 comments

How to train your program verifier

https://risemsr.github.io/blog/2026-02-16-halleyyoung-a3/
28•matt_d•4d ago•5 comments

My journey to the microwave alternate timeline

https://www.lesswrong.com/posts/8m6AM5qtPMjgTkEeD/my-journey-to-the-microwave-alternate-timeline
147•jstanley•4d ago•25 comments

Freemediaheckyeah

https://fmhy.net/
114•con•2h ago•28 comments

Google restricting Google AI Pro/Ultra subscribers for using OpenClaw

https://discuss.ai.google.dev/t/account-restricted-without-warning-google-ai-ultra-oauth-via-open...
474•srigi•7h ago•391 comments

Agentic Software Engineering Book

https://agenticse-book.github.io/
56•bananaflag•3h ago•28 comments

Six Math Essentials

https://terrytao.wordpress.com/2026/02/16/six-math-essentials/
168•digital55•10h ago•31 comments

Man accidentally gains control of 7k robot vacuums

https://www.popsci.com/technology/robot-vacuum-army/
248•Brajeshwar•15h ago•143 comments

The Musidex: A physical music library for the streaming era

https://hannahilea.com/blog/musidex/
27•zdw•3d ago•7 comments

What size should I use for my queue

https://www.syntacticbrownsugar.tech/posts/what-size-queue/
5•syntacticbs•3d ago•1 comments

Aqua: A CLI message tool for AI agents

https://github.com/quailyquaily/aqua
33•lyricat•4h ago•17 comments

Fix your tools

https://ochagavia.nl/blog/fix-your-tools/
214•vinhnx•14h ago•77 comments

Show HN: Local-First Linux MicroVMs for macOS

https://shuru.run
153•harshdoesdev•11h ago•45 comments

Linuxulator on FreeBSD Feels Like Magic

https://hayzam.com/blog/02-linuxulator-is-awesome/
96•vermaden•11h ago•32 comments

Hello Worg, the Org-Mode Community

https://orgmode.org/worg/
105•dargscisyhp•12h ago•29 comments

Using the new bridges of FreeBSD 15

https://blog.feld.me/posts/2026/02/using-new-bridges-freebsd-15/
69•vermaden•7h ago•19 comments

Emulated Windows 3.11 in the Browser

https://pieter.com/
98•jalev•12h ago•46 comments

Keybee: A Keyboard Designed for Smartphones

https://keybeekeyboard.com/
69•surprisetalk•3d ago•57 comments

Rhythms the Compendium: Life aboard an aircraft carrier (2021)

https://thelexicans.wordpress.com/2020/04/05/38223/
9•cwillu•1d ago•0 comments

Show HN: A geometric analysis of Chopin's Prelude No. 4 using 3D topology

https://github.com/jimishol/cholidean-harmony-structure/blob/main/docs/03-case-study-chopin-prelu...
27•jimishol•2d ago•7 comments

Attention Media ≠ Social Networks

https://susam.net/attention-media-vs-social-networks.html
580•susam•17h ago•246 comments

Fresh File Explorer – VS Code extension for navigating recent work

https://github.com/FreHu/vscode-fresh-file-explorer
85•frehu•11h ago•24 comments

$30B for laptops yielded a generation less cognitively capable than parents

https://www.yahoo.com/news/articles/u-spent-30-billion-ditch-110200869.html
156•walterbell•4h ago•144 comments

Git's Magic Files

https://nesbitt.io/2026/02/05/git-magic-files.html
134•chmaynard•15h ago•35 comments

Ask HN: Chromebook leads for K-8 school in need?

23•techteach00•10h ago•27 comments

NanoClaw moved from Apple Containers to Docker

https://twitter.com/Gavriel_Cohen/status/2025603982769410356
137•simplesort•11h ago•103 comments

Xweather Live – Interactive global vector weather map

https://live.xweather.com/
151•unstyledcontent•15h ago•34 comments