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

Comments

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

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

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

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

LinkedIn Is Illegally Searching Your Computer

https://browsergate.eu/
647•digitalWestie•2h ago•314 comments

Qwen3.6-Plus: Towards Real World Agents

https://qwen.ai/blog?id=qwen3.6
67•pretext•54m ago•28 comments

Lemonade by AMD: a fast and open source local LLM server using GPU and NPU

https://lemonade-server.ai
197•AbuAssar•4h ago•53 comments

Inside Nepal's Fake Rescue Racket

https://kathmandupost.com/money/2026/03/27/inside-nepal-s-fake-rescue-racket
122•lode•3h ago•35 comments

IBM Announces Strategic Collaboration with Arm

https://newsroom.ibm.com/2026-04-02-ibm-announces-strategic-collaboration-with-arm-to-shape-the-f...
191•bonzini•6h ago•119 comments

Sweden goes back to basics, swapping screens for books in the classroom

https://undark.org/2026/04/01/sweden-schools-books/
398•novaRom•4h ago•210 comments

Significant Raise of Reports

https://lwn.net/Articles/1065620/
133•stratos123•6h ago•68 comments

Bringing Clojure programming to Enterprise (2021)

https://blogit.michelin.io/clojure-programming/
126•smartmic•7h ago•64 comments

'Backrooms' and the Rise of the Institutional Gothic

https://thereader.mitpress.mit.edu/backrooms-and-the-rise-of-the-institutional-gothic/
25•anarbadalov•2h ago•5 comments

Gone (Almost) Phishin'

https://ma.tt/2026/03/gone-almost-phishin/
106•luu•2d ago•53 comments

Enabling Codex to Analyze Two Decades of Hacker News Data

https://modolap.com/publication/hn-analysis-1
43•ronfriedhaber•4h ago•16 comments

Email obfuscation: What works in 2026?

https://spencermortensen.com/articles/email-obfuscation/
250•jaden•11h ago•74 comments

Emacs-libgterm: Terminal emulator for Emacs using libghostty-vt

https://github.com/rwc9u/emacs-libgterm
43•signa11•4d ago•12 comments

The SpaceX IPO: retail investor notes

https://report.bearblog.dev/the-spacex-ipo-will-be-the-perfect-storm-of-retail-investor-fallacies/
28•u1hcw9nx•4h ago•10 comments

Mercor says it was hit by cyberattack tied to compromise LiteLLM

https://techcrunch.com/2026/03/31/mercor-says-it-was-hit-by-cyberattack-tied-to-compromise-of-ope...
104•jackson-mcd•1d ago•31 comments

Show HN: I built a DNS resolver from scratch in Rust – no DNS libraries

https://github.com/razvandimescu/numa
43•rdme•5h ago•32 comments

Quantum computing bombshells that are not April Fools

https://scottaaronson.blog/?p=9665
228•Strilanc•14h ago•72 comments

On the trail of ancient art, deep in the Sahara

https://www.ft.com/content/524ed21e-5c35-489e-ae0b-90d40b4cf28a
4•bookofjoe•2d ago•1 comments

Steam on Linux Use Skyrocketed Above 5% in March

https://www.phoronix.com/news/Steam-On-Linux-Tops-5p
586•hkmaxpro•12h ago•271 comments

Telli (YC F24) is hiring engineers, designers, and more (on-site, Berlin)

http://hi.telli.com/join-us
1•sebselassie•8h ago

EmDash – A spiritual successor to WordPress that solves plugin security

https://blog.cloudflare.com/emdash-wordpress/
635•elithrar•23h ago•474 comments

Subscription bombing and how to mitigate it

https://bytemash.net/posts/subscription-bombing-your-signup-form-is-a-weapon/
240•homelessdino•11h ago•154 comments

Artemis II Launch Day Updates

https://www.nasa.gov/blogs/missions/2026/04/01/live-artemis-ii-launch-day-updates/
1013•apitman•22h ago•886 comments

Artemis computer running two instances of MS outlook; they can't figure out why

https://bsky.app/profile/nikigrayson.com/post/3miik2wzosk25
9•mooreds•15m ago•4 comments

Built a cheap DIY fan controller because my motherboard never had working PWM

https://www.himthe.dev/blog/msi-forgot-my-fans
57•bobsterlobster•2d ago•19 comments

Reinventing the Pull Request

https://lubeno.dev/blog/reinventing-the-pull-request
49•bkolobara•6d ago•40 comments

A new C++ back end for ocamlc

https://github.com/ocaml/ocaml/pull/14701
220•glittershark•15h ago•19 comments

DRAM pricing is killing the hobbyist SBC market

https://www.jeffgeerling.com/blog/2026/dram-pricing-is-killing-the-hobbyist-sbc-market/
564•ingve•17h ago•495 comments

New laws to make it easier to cancel subscriptions and get refunds

https://www.bbc.co.uk/news/articles/cvg0v36ek2go
123•chrisjj•6h ago•56 comments

Fast and Gorgeous Erosion Filter

https://blog.runevision.com/2026/03/fast-and-gorgeous-erosion-filter.html
211•runevision•2d ago•21 comments