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.

Someone Bought 30 WordPress Plugins and Planted a Backdoor in All of Them

https://anchor.host/someone-bought-30-wordpress-plugins-and-planted-a-backdoor-in-all-of-them/
256•speckx•1h ago•65 comments

Nothing Ever Happens: Polymarket bot that always buys No on non-sports markets

https://github.com/sterlingcrispin/nothing-ever-happens
268•m-hodges•4h ago•105 comments

The Future of Everything Is Lies, I Guess: Safety

https://aphyr.com/posts/417-the-future-of-everything-is-lies-i-guess-safety
183•aphyr•3h ago•87 comments

Show HN: Ithihāsas – a character explorer for Hindu epics, built in a few hours

https://www.ithihasas.in
23•cvrajeesh•39m ago•4 comments

Building a CLI for All of Cloudflare

https://blog.cloudflare.com/cf-cli-local-explorer/
176•soheilpro•4h ago•47 comments

How to make Firefox builds 17% faster

https://blog.farre.se/posts/2026/04/10/caching-webidl-codegen/
22•mbitsnbites•59m ago•0 comments

Servo is now available on crates.io

https://servo.org/blog/2026/04/13/servo-0.1.0-release/
336•ffin•7h ago•115 comments

Tracking down a 25% Regression on LLVM RISC-V

https://blog.kaving.me/blog/tracking-down-a-25-regression-on-llvm-risc-v/
51•luu•23h ago•12 comments

Make Tmux Pretty and Usable (2024)

https://hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
227•speckx•5h ago•166 comments

MEMS Array Chip Can Project Video the Size of a Grain of Sand

https://spectrum.ieee.org/mems-photonics
52•bookofjoe•5h ago•21 comments

All elementary functions from a single binary operator

https://arxiv.org/abs/2603.21852
748•pizza•18h ago•225 comments

Visualizing CPU Pipelining (2024)

https://timmastny.com/blog/visualizing-cpu-pipelining/
7•flipacholas•1h ago•1 comments

Initial mainline video capture and camera support for Rockchip RK3588

https://www.collabora.com/news-and-blog/news-and-events/mainline-video-capture-and-camera-support...
56•mfilion•6h ago•14 comments

Microsoft isn't removing Copilot from Windows 11, it's just renaming it

https://www.neowin.net/opinions/microsoft-isnt-removing-copilot-from-windows-11-its-just-renaming...
243•bundie•6h ago•158 comments

The Looming College-Enrollment Death Spiral

https://www.theatlantic.com/ideas/2026/04/college-enrollment-demographic-cliff/686750/
15•JumpCrisscross•31m ago•3 comments

Your Startup Is Probably Dead on Arrival

https://steveblank.com/2026/03/17/your-startup-is-probably-dead-on-arrival/
38•tie-in•2d ago•25 comments

US appeals court declares 158-year-old home distilling ban unconstitutional

https://nypost.com/2026/04/11/us-news/us-appeals-court-declares-158-year-old-home-distilling-ban-...
257•t-3•6h ago•189 comments

Michigan 'digital age' bills pulled after privacy concerns raised

https://www.thecentersquare.com/michigan/article_7ca4e268-4a68-42fb-9042-f9d8604ebd7f.html
175•iamnothere•7h ago•85 comments

B-trees and database indexes (2024)

https://planetscale.com/blog/btrees-and-database-indexes
9•tosh•2h ago•2 comments

Who's Been Impersonating This ProPublica Reporter?

https://www.propublica.org/article/impersonating-propublica-reporter
61•hn_acker•3h ago•0 comments

The economics of software teams: Why most engineering orgs are flying blind

https://www.viktorcessan.com/the-economics-of-software-teams/
366•kiyanwang•14h ago•221 comments

Evaluation of Claude Mythos Preview's cyber capabilities

https://www.aisi.gov.uk/blog/our-evaluation-of-claude-mythos-previews-cyber-capabilities
31•dgavey•1h ago•15 comments

DIY Soft Drinks

https://blinry.org/diy-soft-drinks/
660•_Microft•1d ago•194 comments

Taking on CUDA with ROCm: 'One Step After Another'

https://www.eetimes.com/taking-on-cuda-with-rocm-one-step-after-another/
247•mindcrime•21h ago•185 comments

We May Be Living Through the Most Consequential Hundred Days in Cyber History

https://ringmast4r.substack.com/p/we-may-be-living-through-the-most
196•laurex•4h ago•113 comments

Bring Back Idiomatic Design (2023)

https://essays.johnloeber.com/p/4-bring-back-idiomatic-design
655•phil294•1d ago•359 comments

Show HN: boringBar – a taskbar-style dock replacement for macOS

https://boringbar.app/
485•a-ve•1d ago•275 comments

Most people can't juggle one ball

https://www.lesswrong.com/posts/jTGbKKGqs5EdyYoRc/most-people-can-t-juggle-one-ball
481•surprisetalk•4d ago•167 comments

Android now stops you sharing your location in photos

https://shkspr.mobi/blog/2026/04/android-now-stops-you-sharing-your-location-in-photos/
280•edent•8h ago•253 comments

Ask HN: What Are You Working On? (April 2026)

306•david927•1d ago•1026 comments