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•11mo ago

Comments

quentinp•11mo 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•11mo ago
Page didnt load for me.

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

Multiprocessing all the way!

emmelaich•11mo ago
(2021)

Good article!

punnerud•11mo 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•11mo 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•11mo ago
How does the GIL come into play here?
punnerud•11mo 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.

You can't trust macOS Privacy and Security settings

https://eclecticlight.co/2026/04/10/why-you-cant-trust-privacy-security/
118•zdw•1h ago•40 comments

WireGuard makes new Windows release following Microsoft signing resolution

https://lists.zx2c4.com/pipermail/wireguard/2026-April/009561.html
68•zx2c4•52m ago•28 comments

1D Chess

https://rowan441.github.io/1dchess/chess.html
80•burnt-resistor•1h ago•11 comments

Helium Is Hard to Replace

https://www.construction-physics.com/p/helium-is-hard-to-replace
66•JumpCrisscross•1h ago•31 comments

Industrial design files for Keychron keyboards and mice

https://github.com/Keychron/Keychron-Keyboards-Hardware-Design
21•stingraycharles•19m ago•2 comments

Bluesky April 2026 Outage Post-Mortem

https://pckt.blog/b/jcalabro/april-2026-outage-post-mortem-219ebg2
18•jcalabro•50m ago•2 comments

CPU-Z and HWMonitor compromised

https://www.theregister.com/2026/04/10/cpuid_site_hijacked/
49•pashadee•3h ago•34 comments

Mysteries of Dropbox: Testing of a Distributed Sync Service (2016) [pdf]

https://www.cis.upenn.edu/~bcpierce/papers/mysteriesofdropbox.pdf
72•JackeJR•3d ago•15 comments

Code is run more than read (2023)

https://olano.dev/blog/code-is-run-more-than-read/
83•facundo_olano•2h ago•44 comments

Clojure on Fennel Part One: Persistent Data Structures

https://andreyor.st/posts/2026-04-07-clojure-on-fennel-part-one-persistent-data-structures/
29•roxolotl•3d ago•0 comments

FBI used iPhone notification data to retrieve deleted Signal messages

https://9to5mac.com/2026/04/09/fbi-used-iphone-notification-data-to-retrieve-deleted-signal-messa...
370•01-_-•5h ago•179 comments

How NASA built Artemis II’s fault-tolerant computer

https://cacm.acm.org/news/how-nasa-built-artemis-iis-fault-tolerant-computer/
538•speckx•1d ago•212 comments

I still prefer MCP over skills

https://david.coffee/i-still-prefer-mcp-over-skills/
368•gmays•14h ago•309 comments

France to ditch Windows for Linux to reduce reliance on US tech

https://techcrunch.com/2026/04/10/france-to-ditch-windows-for-linux-to-reduce-reliance-on-us-tech/
148•Teever•1h ago•53 comments

Penguin 'Toxicologists' Find PFAS Chemicals in Remote Patagonia

https://www.ucdavis.edu/health/news/penguin-toxicologists-find-pfas-chemicals-remote-patagonia
103•giuliomagnifico•10h ago•42 comments

A new trick brings stability to quantum operations

https://ethz.ch/en/news-and-events/eth-news/news/2026/04/a-new-trick-brings-stability-to-quantum-...
200•joko42•12h ago•47 comments

C++: Freestanding Standard Library

https://www.sandordargo.com/blog/2026/04/08/cpp-freestanding
16•ingve•2d ago•2 comments

Native Instant Space Switching on macOS

https://arhan.sh/blog/native-instant-space-switching-on-macos/
593•PaulHoule•20h ago•288 comments

Deterministic Primality Testing for Limited Bit Width

https://www.jeremykun.com/2026/04/07/deterministic-miller-rabin/
13•ibobev•2d ago•1 comments

Supply chain nightmare: How Rust will be attacked and what we can do to mitigate

https://kerkour.com/rust-supply-chain-nightmare
40•fanf2•2h ago•19 comments

Show HN: Marimo pair – Reactive Python notebooks as environments for agents

https://github.com/marimo-team/marimo-pair
93•manzt•2d ago•22 comments

We've raised $17M to build what comes after Git

https://blog.gitbutler.com/series-a
256•ellieh•14h ago•556 comments

DRAM has a design flaw from 1966. I bypassed it [video]

https://www.youtube.com/watch?v=KKbgulTp3FE
347•surprisetalk•2d ago•123 comments

US summons bank bosses over cyber risks from Anthropic's latest AI model

https://www.theguardian.com/technology/2026/apr/10/us-summoned-bank-bosses-to-discuss-cyber-risks...
58•ascold•2h ago•31 comments

Generative art over the years

https://blog.veitheller.de/Generative_art_over_the_years.html
211•evakhoury•3d ago•56 comments

"Negative" views of Broadcom driving VMware migrations, rival says

https://arstechnica.com/information-technology/2026/04/nutanix-claims-it-has-poached-30000-vmware...
33•breve•2h ago•11 comments

CollectWise (YC F24) Is Hiring

https://www.ycombinator.com/companies/collectwise/jobs/Ktc6m6o-ai-agent-engineer
1•OBrien_1107•11h ago

Show HN: Keeper – embedded secret store for Go (help me break it)

https://github.com/agberohq/keeper
52•babawere•7h ago•28 comments

OpenAI backs Illinois bill that would limit when AI labs can be held liable

https://www.wired.com/story/openai-backs-bill-exempt-ai-firms-model-harm-lawsuits/
374•smurda•3h ago•266 comments

Charcuterie – Visual similarity Unicode explorer

https://charcuterie.elastiq.ch/
288•rickcarlino•20h ago•67 comments