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

Comments

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

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

Multiprocessing all the way!

emmelaich•12mo ago
(2021)

Good article!

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

Google broke reCAPTCHA for de-googled Android users

https://reclaimthenet.org/google-broke-recaptcha-for-de-googled-android-users
799•anonymousiam•10h ago•264 comments

A recent experience with ChatGPT 5.5 Pro

https://gowers.wordpress.com/2026/05/08/a-recent-experience-with-chatgpt-5-5-pro/
21•_alternator_•2h ago•0 comments

OpenAI's WebRTC problem

https://moq.dev/blog/webrtc-is-the-problem/
212•atgctg•1d ago•56 comments

Mythical Man Month

https://martinfowler.com/bliki/MythicalManMonth.html
74•ingve•1d ago•62 comments

Bitter Lessons from the ISSpresso

https://mceglowski.substack.com/p/bitter-lessons-from-the-isspresso
63•zdw•2d ago•14 comments

AI is breaking two vulnerability cultures

https://www.jefftk.com/p/ai-is-breaking-two-vulnerability-cultures
295•speckx•11h ago•123 comments

The React2Shell Story

https://lachlan.nz/blog/the-react2shell-story/
94•mufeedvh•12h ago•5 comments

David Attenborough's 100th Birthday

https://www.bbc.com/news/articles/cp3pww9g0p5o
524•defrost•17h ago•100 comments

Wi is Fi: Understanding Wi-Fi 4/5/6/6E/7/8 (802.11 n/AC/ax/be/bn)

https://www.wiisfi.com/
143•homebrewer•2d ago•49 comments

Cartoon Network Flash Games

https://www.webdesignmuseum.org/flash-game-exhibitions/cartoon-network-flash-games
309•willmeyers•12h ago•102 comments

Light without electricity? Glowing algae could make it possible

https://www.colorado.edu/today/2026/05/06/light-without-electricity-glowing-algae-could-make-it-p...
38•geox•2d ago•14 comments

AWS North Virginia data center outage – recovery to take hours

https://www.cnbc.com/2026/05/08/aws-outage-data-center-fanduel-coinbase.html
174•christhecaribou•1d ago•121 comments

You gave me a u32. I gave you root. (io_uring ZCRX freelist LPE)

https://ze3tar.github.io/post-zcrx.html
160•MrBruh•9h ago•90 comments

An Introduction to Meshtastic

https://meshtastic.org/docs/introduction/
391•ColinWright•17h ago•153 comments

The Soul of Maintaining a New Machine

https://books.worksinprogress.co/book/maintenance-of-everything/communities-of-practice/the-soul-...
23•akkartik•3d ago•2 comments

Can LLMs model real-world systems in TLA+?

https://www.sigops.org/2026/can-llms-model-real-world-systems-in-tla/
56•mad•12h ago•9 comments

Teaching Claude Why

https://www.anthropic.com/research/teaching-claude-why
118•pretext•11h ago•51 comments

Serving a website on a Raspberry Pi Zero running in RAM

https://btxx.org/posts/memory/
200•xngbuilds•13h ago•87 comments

When is your birthday? The math behind hash collisions

https://0xkrt26.github.io/math_behind_security/2026/05/08/birthday-problem.html
31•denismenace•8h ago•4 comments

Over 97% of the 'Linux' Foundation's Budget Goes Not to Linux

https://techrights.org/n/2026/05/08/Over_97_of_the_Linux_Foundation_s_Budget_Goes_Not_to_Linux.shtml
40•esaym•1h ago•19 comments

Mojo 1.0 Beta

https://mojolang.org/
323•sbt567•1d ago•197 comments

Mux (YC W16) Is Hiring

https://www.mux.com/jobs
1•mmcclure•8h ago

Meta Shuts Down End-to-End Encryption for Instagram Messaging

https://www.pcmag.com/news/meta-shuts-down-end-to-end-encryption-for-instagram-dms-messaging
213•tcp_handshaker•7h ago•130 comments

US Government releases first batch of UAP documents and videos

https://www.war.gov/UFO/
251•david-gpu•16h ago•411 comments

Looking at the data behind prediction markets

https://asteriskmag.com/issues/14/are-prediction-markets-good-for-anything
71•kqr•1d ago•32 comments

Boosting multimodal inference performance by >10% with a single Python dict

https://modal.com/blog/boosting-multimodal-inference-performance-by-greater-than-10-with-a-single...
5•jxmorris12•2d ago•0 comments

Poland is now among the 20 largest economies

https://apnews.com/article/poland-economy-growth-g20-gdp-26fe06e120398410f8d773ba5661e7aa
936•surprisetalk•16h ago•746 comments

PC Engine CPU

https://jsgroth.dev/blog/posts/pc-engine-cpu/
134•ibobev•14h ago•57 comments

Non-determinism is an issue with patching CVEs

https://flox.dev/blog/achieving-rapid-cve-remediation-in-an-era-of-escalating-vulnerabilities/
44•mathewpregasen•7h ago•12 comments

Ask HN: We just had an actual UUID v4 collision...

338•mittermayr•21h ago•274 comments