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.

Claude Sonnet 4.6

https://www.anthropic.com/news/claude-sonnet-4-6
914•adocomplete•9h ago•829 comments

Halt and Catch Fire: TV's Best Drama You've Probably Never Heard Of (2021)

https://www.sceneandheardnu.com/content/halt-and-catch-fire
22•walterbell•1h ago•7 comments

Thank HN: You helped save 33k lives

516•chaseadam17•10h ago•64 comments

BarraCUDA Open-source CUDA compiler targeting AMD GPUs

https://github.com/Zaneham/BarraCUDA
184•rurban•6h ago•55 comments

Thousands of CEOs just admitted AI had no impact on employment or productivity

https://fortune.com/2026/02/17/ai-productivity-paradox-ceo-study-robert-solow-information-technol...
135•virgildotcodes•1h ago•79 comments

Show HN: AsteroidOS 2.0 – Nobody asked, we shipped anyway

https://asteroidos.org/news/2-0-release/index.html
297•moWerk•7h ago•34 comments

Minimal x86 Kernel Zig

https://github.com/lopespm/zig-minimal-kernel-x86
32•lopespm•3h ago•4 comments

Gentoo on Codeberg

https://www.gentoo.org/news/2026/02/16/codeberg.html
266•todsacerdoti•10h ago•92 comments

I swear the UFO is coming any minute

https://www.experimental-history.com/p/i-swear-the-ufo-is-coming-any-minute
116•Ariarule•5h ago•33 comments

Using go fix to modernize Go code

https://go.dev/blog/gofix
296•todsacerdoti•10h ago•66 comments

Google Public CA is down

https://status.pki.goog/incidents/5oJEbcU3ZfMfySTSXXd3
179•aloknnikhil•2h ago•97 comments

So you want to build a tunnel

https://practical.engineering/blog/2026/2/17/so-you-want-to-build-a-tunnel
180•crescit_eundo•10h ago•75 comments

Async/Await on the GPU

https://www.vectorware.com/blog/async-await-on-gpu/
162•Philpax•10h ago•48 comments

Reverse Engineering Sid Meier's Railroad Tycoon for DOS from 1990

https://www.vogons.org/viewtopic.php?t=105451
21•LowLevelMahn•3d ago•3 comments

Assistant to the Regional Manager

https://smallpotatoes.paulbloom.net/p/assistant-to-the-regional-manager
72•NaOH•4d ago•28 comments

Is Show HN dead? No, but it's drowning

https://www.arthurcnops.blog/death-of-show-hn/
420•acnops•16h ago•360 comments

It's not just you, YouTube is partially down in outage

https://9to5google.com/2026/02/17/youtube-outage-february-2026/
28•aqeelat•1h ago•2 comments

Show HN: I wrote a technical history book on Lisp

https://berksoft.ca/gol/
170•cdegroot•11h ago•63 comments

Structured AI (YC F25) Is Hiring

https://www.ycombinator.com/companies/structured-ai/jobs/q3cx77y-gtm-intern
1•issygreenslade•6h ago

I converted 2D conventional flight tracking into 3D

https://aeris.edbn.me/?city=SFO
223•kewonit•12h ago•45 comments

Physicists Make Electrons Flow Like Water

https://www.quantamagazine.org/physicists-make-electrons-flow-like-water-20260211/
81•rbanffy•4d ago•8 comments

Show HN: Pg-typesafe – Strongly typed queries for PostgreSQL and TypeScript

https://github.com/n-e/pg-typesafe
48•n_e•9h ago•20 comments

'My Words Are Like an Uncontrollable Dog': On Life with Nonfluent Aphasia

https://thereader.mitpress.mit.edu/my-words-are-like-an-uncontrollable-dog-on-life-with-nonfluent...
29•anarbadalov•4h ago•5 comments

Create bootable ISO image files which are compatible with the Amiga CD32

https://github.com/fuseoppl/isocd-win
10•doener•4h ago•0 comments

Use Microsoft Office Shortcuts in Libre Office

https://github.com/Zaki101Aslam/MS-office-shortcuts-for-Libre-Office
21•Zaki101Aslam•2d ago•5 comments

HackMyClaw

https://hackmyclaw.com/
264•hentrep•10h ago•138 comments

Advice, not control: the role of Remote Assistance in Waymo's operations

https://waymo.com/blog/?modal=short-advice-not-control-the-role-of-remote-assistance
53•xnx•2h ago•48 comments

Show HN: Box of Rain - Auto-Layouted ASCII Diagrams

https://github.com/switz/box-of-rain
16•switz•3d ago•6 comments

I Use Obsidian

https://stephango.com/vault
25•hisamafahri•4h ago•16 comments

Contra "Grandmaster-level chess without search" (2024)

https://cosmo.tardis.ac/files/2024-02-13-searchless.html
33•luu•2d ago•2 comments