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.

Agents can now create Cloudflare accounts, buy domains, and deploy

https://blog.cloudflare.com/agents-stripe-projects/
213•rolph•3h ago•116 comments

StarFighter 16-Inch

https://us.starlabs.systems/pages/starfighter
219•signa11•5h ago•125 comments

CARA 2.0 – "I Built a Better Robot Dog"

https://www.aaedmusa.com/projects/cara2
51•hakonjdjohnsen•2d ago•1 comments

.de TLD offline due to DNSSEC?

https://dnssec-analyzer.verisignlabs.com/nic.de
620•warpspin•10h ago•307 comments

Telus Uses AI to Alter Call-Agent Accents

https://letsdatascience.com/news/telus-uses-ai-to-alter-call-agent-accents-a3868f63
118•debo_•5h ago•73 comments

245TB Micron 6600 ION Data Center SSD Now Shipping

https://investors.micron.com/news-releases/news-release-details/industry-leading-245tb-micron-660...
46•neilfrndes•3h ago•35 comments

Accelerating Gemma 4: faster inference with multi-token prediction drafters

https://blog.google/innovation-and-ai/technology/developers-tools/multi-token-prediction-gemma-4/
533•amrrs•14h ago•245 comments

YouTube, your RSS feeds are broken

https://openrss.org/blog/youtube-your-feeds-are-broken
80•veeti•5h ago•27 comments

Write some software, give it away for free

https://nonogra.ph/write-some-software-give-it-away-for-free-05-05-2026
231•nohell•9h ago•147 comments

Computer Use is 45x more expensive than structured APIs

https://reflex.dev/blog/computer-use-is-45x-more-expensive-than-structured-apis/
380•palashawas•14h ago•215 comments

Three Inverse Laws of AI

https://susam.net/inverse-laws-of-robotics.html
420•blenderob•15h ago•284 comments

Ombudsman column: The Pentagon is trying to silence me

https://www.stripes.com/opinion/2026-04-23/stripes-former-ombudsman-pentagon-trying-to-silence-21...
159•petethomas•3h ago•22 comments

EEVblog: The 555 Timer is 55 years old [video]

https://www.youtube.com/watch?v=6JhK8iCQuqI
274•brudgers•15h ago•67 comments

Why most product tours get skipped

https://productonboarding.com/articles/why-product-tours-get-skipped
134•pancomplex•10h ago•104 comments

Make some art with your phone sensors

https://tautme.github.io/phone-sensors/sensor-etch.html
21•adm4•2d ago•5 comments

Wiki Builder: Skill to Build LLM Knowledge Bases

https://academy.dair.ai/blog/wiki-builder-claude-code-plugin
46•omarsar•2d ago•6 comments

Google Chrome silently installs a 4 GB AI model on your device without consent

https://www.thatprivacyguy.com/blog/chrome-silent-nano-install/
1387•john-doe•23h ago•924 comments

Today I've made the difficult decision to reduce the size of Coinbase by ~14%

https://twitter.com/brian_armstrong/status/2051616759145185723
342•adrianmsmith•18h ago•519 comments

Show HN: Explore color palettes inspired by 3000 master painter artworks

https://paletteinspiration.com/
152•ouli•12h ago•58 comments

I'm scared about biological computing

https://kuber.studio/blog/Reflections/I%27m-Scared-About-Biological-Computing
196•kuberwastaken•15h ago•160 comments

Show HN: Airbyte Agents – context for agents across multiple data sources

112•mtricot•16h ago•29 comments

Agents for financial services and insurance

https://www.anthropic.com/news/finance-agents
228•louiereederson•16h ago•169 comments

Five Banana Lessons

https://allensthoughts.com/2026/05/03/five-banana-lessons/
5•herbertl•2d ago•0 comments

Should I run plain Docker Compose in production in 2026?

https://distr.sh/blog/running-docker-in-production/
389•pmig•5d ago•273 comments

When everyone has AI and the company still learns nothing

https://www.robert-glaser.de/when-everyone-has-ai-and-the-company-still-learns-nothing/
348•youngbrioche•21h ago•233 comments

GLM-5V-Turbo: Toward a Native Foundation Model for Multimodal Agents

https://arxiv.org/abs/2604.26752
136•gmays•13h ago•28 comments

Feds Fine Durham Energy Efficiency Co $722M

https://www.theassemblync.com/news/business/american-efficient-ferc-durham-fine/
19•ChuckMcM•2d ago•10 comments

I completed 100 Days of Java over 5 years and mapped the journey as a graph

https://mohibulsblog.netlify.app/java/100daysofjava/graph/
50•celurian92•2d ago•20 comments

California farmers to destroy 420k peach trees following Del Monte bankruptcy

https://www.sfgate.com/centralcoast/article/usda-aid-california-farmers-22240694.php
319•littlexsparkee•12h ago•374 comments

Zuckerberg 'Personally Authorized and Encouraged' Meta's Copyright Infringement

https://variety.com/2026/digital/news/meta-ai-mark-zuckerberg-copyright-infringement-lawsuit-publ...
368•spankibalt•13h ago•327 comments