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

Comments

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

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

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

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

Windows Notepad App Remote Code Execution Vulnerability

https://www.cve.org/CVERecord?id=CVE-2026-20841
262•riffraff•4h ago•152 comments

A Cosmic Miracle: A Remarkably Luminous Galaxy at z=14.44 Confirmed with JWST

https://astro.theoj.org/article/156033-a-cosmic-miracle-a-remarkably-luminous-galaxy-at-_z_-sub-s...
26•yread•2h ago•12 comments

It's All a Blur

https://lcamtuf.substack.com/p/its-all-a-blur
24•zdw•5d ago•2 comments

The Feynman Lectures on Physics (1961-1964)

https://www.feynmanlectures.caltech.edu/
343•rramadass•23h ago•84 comments

Signy: Signed URLs for Small Devices

https://github.com/golioth/signy
37•hasheddan•4d ago•1 comments

The Singularity will occur on a Tuesday

https://campedersen.com/singularity
1122•ecto•18h ago•613 comments

Ex-GitHub CEO launches a new developer platform for AI agents

https://entire.io/blog/hello-entire-world/
506•meetpateltech•19h ago•468 comments

Show HN: CodeMic

https://codemic.io/#hn
21•seansh•3d ago•8 comments

Exploring a Modern SMTPE 2110 Broadcast Truck

https://www.jeffgeerling.com/blog/2026/exploring-a-modern-smpte-2110-broadcast-truck-with-my-dad/
110•assimpleaspossi•2d ago•12 comments

FAA Halts All Flights at El Paso Airport for 10 Days

https://www.nytimes.com/2026/02/11/us/faa-el-paso-flight-restrictions.html
93•edward•2h ago•39 comments

The Day the Telnet Died

https://www.labs.greynoise.io/grimoire/2026-02-10-telnet-falls-silent/
359•pjf•12h ago•251 comments

Clean-room implementation of Half-Life 2 on the Quake 1 engine

https://code.idtech.space/fn/hl2
387•klaussilveira•23h ago•80 comments

CoLoop (YC S21) Is Hiring Ex Technical Founders in London

https://www.workatastartup.com/jobs/90016
1•mrlowlevel•4h ago

Fun With Pinball

https://www.funwithpinball.com/exhibits/small-boards
94•jackwilsdon•10h ago•9 comments

Simplifying Vulkan one subsystem at a time

https://www.khronos.org/blog/simplifying-vulkan-one-subsystem-at-a-time
258•amazari•21h ago•169 comments

The Little Learner: A Straight Line to Deep Learning (2023)

https://mitpress.mit.edu/9780262546379/the-little-learner/
160•AlexeyBrin•2d ago•19 comments

My eighth year as a bootstrapped founder

https://mtlynch.io/bootstrapped-founder-year-8/
245•mtlynch•2d ago•66 comments

Show HN: I taught GPT-OSS-120B to see using Google Lens and OpenCV

29•vkaufmann•5h ago•15 comments

Communities Are Not Fungible

https://www.joanwestenberg.com/communities-are-not-fungible/
41•tardibear•3h ago•22 comments

Mathematicians disagree on the essential structure of the complex numbers (2024)

https://www.infinitelymore.xyz/p/complex-numbers-essential-structure
208•FillMaths•18h ago•266 comments

Europe's $24T Breakup with Visa and Mastercard Has Begun

https://europeanbusinessmagazine.com/business/europes-24-trillion-breakup-with-visa-and-mastercar...
934•NewCzech•23h ago•791 comments

Flirt: The Native Backend

https://blog.buenzli.dev/flirt-native-backend/
21•senekor•3d ago•5 comments

The Falkirk Wheel

https://www.scottishcanals.co.uk/visit/canals/visit-the-forth-clyde-canal/attractions/the-falkirk...
81•scapecast•14h ago•39 comments

Willow – Protocols for an uncertain future [video]

https://fosdem.org/2026/schedule/event/CVGZAV-willow/
64•todsacerdoti•3d ago•5 comments

Show HN: JavaScript-first, open-source WYSIWYG DOCX editor

https://github.com/eigenpal/docx-js-editor
103•thisisjedr•1d ago•33 comments

Show HN: Rowboat – AI coworker that turns your work into a knowledge graph (OSS)

https://github.com/rowboatlabs/rowboat
165•segmenta•18h ago•39 comments

Competition is not market validation

https://www.ablg.io/blog/competition-is-not-validation
114•tonioab•19h ago•31 comments

Rivian R2: Electric Mid-Size SUV

https://rivian.com/r2
124•socialcommenter•10h ago•217 comments

A brief history of oral peptides

https://seangeiger.substack.com/p/a-brief-history-of-oral-peptides
118•odedfalik•1d ago•43 comments

Show HN: I built a macOS tool for network engineers – it's called NetViews

https://www.netviews.app
218•n1sni•1d ago•55 comments