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

Comments

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

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

Multiprocessing all the way!

emmelaich•7mo ago
(2021)

Good article!

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

Janet Jackson had the power to crash laptop computers (2022)

https://devblogs.microsoft.com/oldnewthing/20220816-00/?p=106994
170•montalbano•3h ago•69 comments

Nvidia's $20B Antitrust Loophole (Not an Acquisition)

https://ossa-ma.github.io/blog/groq
126•ossa-ma•2h ago•50 comments

Gpg.fail

https://gpg.fail
146•todsacerdoti•3h ago•57 comments

How we lost communication to entertainment

https://ploum.net/2025-12-15-communication-entertainment.html
10•8organicbits•22m ago•1 comments

Floor796

https://floor796.com/
306•krtkush•7h ago•47 comments

Clock synchronization is a nightmare

https://arpitbhayani.me/blogs/clock-sync-nightmare/
48•grep_it•4d ago•26 comments

Windows 2 for the Apricot PC/Xi

https://www.ninakalinina.com/notes/win2apri/
26•todsacerdoti•2h ago•5 comments

OrangePi 6 Plus Review

https://boilingsteam.com/orange-pi-6-plus-review/
91•ekianjo•7h ago•71 comments

Show HN: Ez FFmpeg – Video editing in plain English

http://npmjs.com/package/ezff
294•josharsh•11h ago•137 comments

How uv got so fast

https://nesbitt.io/2025/12/26/how-uv-got-so-fast.html
1165•zdw•1d ago•398 comments

Ask HN: Resources to get better at outbound sales?

108•sieep•6d ago•31 comments

Scientists Edited Genes Inside a Living Person for First Time, Saved His Life

https://www.popularmechanics.com/science/health/a64815804/crispr-therapy/
49•QueensGambit•2h ago•7 comments

NMH BASIC

https://t3x.org/nmhbasic/index.html
31•AlexeyBrin•6h ago•1 comments

Show HN: Mysti – Claude, Codex, and Gemini debate your code, then synthesize

https://github.com/DeepMyst/Mysti
131•bahaAbunojaim•4d ago•109 comments

Mruby: Ruby for Embedded Systems

https://github.com/mruby/mruby
108•nateb2022•5d ago•29 comments

Splice a Fibre

https://react-networks-lib.rackout.net/fibre
73•matt-p•8h ago•33 comments

Intertapes – collection of found cassette tapes from different locations

https://intertapes.net/
82•wallflower•6d ago•7 comments

Love Actually is around Heathrow (2021)

https://www.heathrow.com/latest-news/love-actually-is-all-around-at-heathrow-airport
5•susam•2d ago•0 comments

Exe.dev

https://exe.dev/
388•achairapart•20h ago•228 comments

Cleartext Signatures Considered Harmful

https://gnupg.org/blog/20251226-cleartext-signatures.html
27•derleyici•2h ago•1 comments

Pre-commit hooks are broken

https://jyn.dev/pre-commit-hooks-are-fundamentally-broken/
113•todsacerdoti•16h ago•96 comments

Always bet on text (2014)

https://graydon2.dreamwidth.org/193447.html
318•jesseduffield•21h ago•164 comments

Detect memory leaks of C extensions with psutil and psleak

https://gmpy.dev/blog/2025/psutil-heap-introspection-apis
50•grodola•3d ago•8 comments

QNX Self-Hosted Developer Desktop

https://devblog.qnx.com/qnx-self-hosted-developer-desktop-initial-release/
253•transpute•19h ago•140 comments

Publishing your work increases your luck

https://github.com/readme/guides/publishing-your-work
253•magoghm•19h ago•98 comments

Some Junk Theorems in Lean

https://github.com/James-Hanson/junk-theorems-in-lean
71•saithound•4d ago•52 comments

The best things and stuff of 2025

https://blog.fogus.me/2025/12/23/the-best-things-and-stuff-of-2025.html
357•adityaathalye•4d ago•73 comments

Langjam-Gamejam Devlog: Making a language, compiler, VM and 5 games in 52 hours

https://github.com/Syn-Nine/gar-lang/blob/main/DEVLOG.md
103•suioir•5d ago•10 comments

This PNG shows a different version when loaded in Chrome than in Safari

https://lr0.org/blog/p/pngchanges/
53•lr0•3h ago•34 comments

Faster practical modular inversion

https://purplesyringa.moe/blog/faster-practical-modular-inversion/
50•todsacerdoti•6d ago•3 comments