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.

Filing the corners off my MacBooks

https://kentwalters.com/posts/corners/
670•normanvalentine•9h ago•347 comments

Artemis II safely splashes down

https://www.cbsnews.com/live-updates/artemis-ii-splashdown-return/
797•areoform•7h ago•259 comments

1D Chess

https://rowan441.github.io/1dchess/chess.html
773•burnt-resistor•15h ago•139 comments

Starfling: A one-tap endless orbital slingshot game in a single HTML file

https://playstarfling.com
70•iceberger2001•2d ago•22 comments

Installing every* Firefox extension

https://jack.cab/blog/every-firefox-extension
322•RohanAdwankar•9h ago•36 comments

Chimpanzees in Uganda locked in eight-year 'civil war', say researchers

https://www.bbc.com/news/articles/cr71lkzv49po
304•neversaydie•12h ago•172 comments

20 years on AWS and never not my job

https://www.daemonology.net/blog/2026-04-11-20-years-on-AWS-and-never-not-my-job.html
95•cperciva•1h ago•8 comments

Great at gaming? US air traffic control wants you to apply

https://www.bbc.com/news/articles/ce84rvx0e6do
15•1659447091•2h ago•14 comments

WireGuard makes new Windows release following Microsoft signing resolution

https://lists.zx2c4.com/pipermail/wireguard/2026-April/009561.html
451•zx2c4•15h ago•127 comments

Bevy game development tutorials and in-depth resources

https://taintedcoders.com/
67•GenericCanadian•2d ago•12 comments

AI assistance when contributing to the Linux kernel

https://github.com/torvalds/linux/blob/master/Documentation/process/coding-assistants.rst
275•hmokiguess•12h ago•181 comments

Industrial design files for Keychron keyboards and mice

https://github.com/Keychron/Keychron-Keyboards-Hardware-Design
354•stingraycharles•15h ago•109 comments

Flashback to a time when government reports were works of art

https://www.chicagotribune.com/2026/04/08/transportation-library-northwestern/
9•NaOH•2d ago•1 comments

A practical guide for setting up Zettelkasten method in Obsidian

https://desktopcommander.app/blog/zettelkasten-obsidian/
38•rkrizanovskis•1d ago•16 comments

JSON formatter Chrome plugin now closed and injecting adware

https://github.com/callumlocke/json-formatter
201•jkl5xx•12h ago•109 comments

CPU-Z and HWMonitor compromised

https://www.theregister.com/2026/04/10/cpuid_site_hijacked/
308•pashadee•17h ago•88 comments

Helium is hard to replace

https://www.construction-physics.com/p/helium-is-hard-to-replace
297•JumpCrisscross•16h ago•205 comments

Investigating Split Locks on x86-64

https://chipsandcheese.com/p/investigating-split-locks-on-x86
51•ingve•3d ago•13 comments

Italo Calvino: A traveller in a world of uncertainty

https://www.historytoday.com/archive/portrait-author-historian/italo-calvino-traveller-world-unce...
66•lermontov•7h ago•13 comments

Quien – A better WHOIS lookup tool

https://github.com/retlehs/quien/
24•bretthopper•3h ago•6 comments

The Bra-and-Girdle Maker That Fashioned the Impossible for NASA

https://thereader.mitpress.mit.edu/the-bra-and-girdle-maker-that-fashioned-the-impossible-for-nasa/
79•sohkamyung•1d ago•4 comments

Productive Procrastination

https://www.maxvanijsselmuiden.nl/blog/productive-procrastination/
8•maxvij•2h ago•5 comments

What is RISC-V and why it matters to Canonical

https://ubuntu.com/blog/risc-v-101-what-is-it-and-what-does-it-mean-for-canonical
119•fork-bomber•2d ago•77 comments

Watgo – A WebAssembly Toolkit for Go

https://eli.thegreenplace.net/2026/watgo-a-webassembly-toolkit-for-go/
90•ibobev•12h ago•6 comments

Launch HN: Twill.ai (YC S25) – Delegate to cloud agents, get back PRs

https://twill.ai
65•danoandco•15h ago•61 comments

Nowhere is safe

https://steveblank.com/2026/04/09/nowhere-is-safe/
177•sblank•11h ago•216 comments

OpenClaw’s memory is unreliable, and you don’t know when it will break

https://blog.nishantsoni.com/p/ive-seen-a-thousand-openclaw-deploys
102•sonink•12h ago•114 comments

A compelling title that is cryptic enough to get you to take action on it

https://ericwbailey.website/published/a-compelling-title-that-is-cryptic-enough-to-get-you-to-tak...
215•mooreds•14h ago•116 comments

Intel 486 CPU announced April 10, 1989

https://dfarq.homeip.net/intel-486-cpu-announced-april-10-1989/
160•jnord•19h ago•149 comments

PGLite Evangelism

https://substack.com/home/post/p-193415720
55•surprisetalk•1d ago•12 comments