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.

Claude Code Routines

https://code.claude.com/docs/en/routines
258•matthieu_bl•4h ago•158 comments

The Dangers of California's Legislation to Censor 3D Printing

https://www.eff.org/deeplinks/2026/04/dangers-californias-legislation-censor-3d-printing
40•salkahfi•21h ago•127 comments

Rare concert recordings are landing on the Internet Archive

https://techcrunch.com/2026/04/13/thousands-of-rare-concert-recordings-are-landing-on-the-interne...
427•jrm-veris•7h ago•126 comments

The Orange Pi 6 Plus

https://taoofmac.com/space/reviews/2026/04/11/1900
54•rcarmo•3d ago•17 comments

Trusted access for the next era of cyber defense

https://openai.com/index/scaling-trusted-access-for-cyber-defense/
18•surprisetalk•1h ago•13 comments

5NF and Database Design

https://kb.databasedesignbook.com/posts/5nf/
103•petalmind•5h ago•43 comments

Spain to expand internet blocks to tennis, golf, movies broadcasting times

https://bandaancha.eu/articulos/telefonica-consigue-bloqueos-ips-11731
388•akyuu•4h ago•362 comments

I wrote to Flock's privacy contact to opt out of their domestic spying program

https://honeypot.net/2026/04/14/i-wrote-to-flocks-privacy.html
396•speckx•3h ago•166 comments

Turn your best AI prompts into one-click tools in Chrome

https://blog.google/products-and-platforms/products/chrome/skills-in-chrome/
57•xnx•4h ago•28 comments

Let's Talk Space Toilets

https://mceglowski.substack.com/p/lets-talk-space-toilets
91•zdw•22h ago•33 comments

guide.world: A compendium of travel guides

https://guide.world/
40•firloop•5d ago•7 comments

Show HN: Plain – The full-stack Python framework designed for humans and agents

https://github.com/dropseed/plain
35•focom•3h ago•13 comments

OpenSSL 4.0.0

https://github.com/openssl/openssl/releases/tag/openssl-4.0.0
134•petecooper•3h ago•37 comments

Tell HN: Fiverr left customer files public and searchable

102•morpheuskafka•2h ago•9 comments

Show HN: LangAlpha – what if Claude Code was built for Wall Street?

https://github.com/ginlix-ai/langalpha
79•zc2610•6h ago•27 comments

Troubleshooting Email Delivery to Microsoft Users

https://rozumem.xyz/posts/14
5•rozumem•2d ago•0 comments

Gas Town: From Clown Show to v1.0

https://steve-yegge.medium.com/gas-town-from-clown-show-to-v1-0-c239d9a407ec
47•martythemaniak•2h ago•44 comments

Backblaze has stopped backing up OneDrive and Dropbox folders and maybe others

https://rareese.com/posts/backblaze/
864•rrreese•13h ago•529 comments

The Mouse Programming Language on CP/M

https://techtinkering.com/articles/the-mouse-programming-language-on-cpm/
39•PaulHoule•3d ago•3 comments

ClawRun – Deploy and manage AI agents in seconds

https://github.com/clawrun-sh/clawrun
22•afshinmeh•2h ago•3 comments

YouTube now world's largest media company, topping Disney

https://www.hollywoodreporter.com/business/digital/youtube-worlds-largest-media-company-2025-tops...
213•bookofjoe•5d ago•165 comments

jj – the CLI for Jujutsu

https://steveklabnik.github.io/jujutsu-tutorial/introduction/what-is-jj-and-why-should-i-care.html
453•tigerlily•11h ago•391 comments

Carol's Causal Conundrum: a zine intro to causally ordered message delivery

https://decomposition.al/zines/
37•evakhoury•4d ago•3 comments

Introspective Diffusion Language Models

https://introspective-diffusion.github.io/
210•zagwdt•13h ago•41 comments

Show HN: A memory database that forgets, consolidates, and detects contradiction

https://github.com/yantrikos/yantrikdb-server
37•pranabsarkar•5h ago•22 comments

Nucleus Nouns

https://ben-mini.com/2026/nucleus-nouns
51•bewal416•4d ago•12 comments

DaVinci Resolve – Photo

https://www.blackmagicdesign.com/products/davinciresolve/photo
1017•thebiblelover7•19h ago•256 comments

A new spam policy for “back button hijacking”

https://developers.google.com/search/blog/2026/04/back-button-hijacking
791•zdw•18h ago•453 comments

The M×N problem of tool calling and open-source models

https://www.thetypicalset.com/blog/grammar-parser-maintenance-contract
117•remilouf•5d ago•39 comments

Lean proved this program correct; then I found a bug

https://kirancodes.me/posts/log-who-watches-the-watchers.html
371•bumbledraven•21h ago•166 comments