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.

Publish on your own site, syndicate elsewhere

https://indieweb.org/POSSE#
457•47thpresident•9h ago•104 comments

Daft Punk Easter Egg in the BPM Tempo of Harder, Better, Faster, Stronger?

https://www.madebywindmill.com/tempi/blog/hbfs-bpm/
321•simonw•7h ago•59 comments

A Basic Just-In-Time Compiler (2015)

https://nullprogram.com/blog/2015/03/19/
39•ibobev•3h ago•7 comments

2026 will be my year of the Linux desktop

https://xeiaso.net/notes/2026/year-linux-desktop/
342•todsacerdoti•4h ago•247 comments

Show HN: Website that plays the lottery every second

https://lotteryeverysecond.lffl.me/
96•Loeffelmann•4h ago•36 comments

Adventure 751 (1980)

https://bluerenga.blog/2026/01/01/adventure-751-1980/
12•quuxplusone•2h ago•0 comments

Clicks Communicator

https://www.clicksphone.com/en/communicator
290•microflash•11h ago•200 comments

IPv6 just turned 30 and still hasn't taken over the world

https://www.theregister.com/2025/12/31/ipv6_at_30/
306•Brajeshwar•13h ago•612 comments

Ask HN: Who is hiring? (January 2026)

264•whoishiring•12h ago•170 comments

Unix v4 (1973) – Live Terminal

https://unixv4.dev/
135•pjmlp•9h ago•60 comments

Linux kernel security work

http://www.kroah.com/log/blog/2026/01/02/linux-kernel-security-work/
78•chmaynard•7h ago•35 comments

Einstein Probe detects an X-ray flare from nearby star

https://phys.org/news/2025-12-einstein-probe-ray-flare-nearby.html
17•wglb•3h ago•3 comments

Fighting Fire with Fire: Scalable Oral Exams

https://www.behind-the-enemy-lines.com/2025/12/fighting-fire-with-fire-scalable-oral.html
140•sethbannon•10h ago•193 comments

The Cost of a Closure in C: The Rest

https://thephd.dev/the-cost-of-a-closure-in-c-c2y-followup
9•ingve•2d ago•0 comments

TinyTinyTPU: 2×2 systolic-array TPU-style matrix-multiply unit deployed on FPGA

https://github.com/Alanma23/tinytinyTPU-co
97•Xenograph•9h ago•40 comments

Global software engineering job postings outlook – 2026

https://jobswithgpt.com/blog/global_software-engineering_jobs_january_2026/
53•sp1982•7h ago•17 comments

Jank Lang Hit Alpha

https://github.com/jank-lang/jank
131•makemethrowaway•9h ago•22 comments

What you need to know before touching a video file

https://gist.github.com/arch1t3cht/b5b9552633567fa7658deee5aec60453/
313•qbow883•6d ago•195 comments

Proving Liveness with TLA

https://roscidus.com/blog/blog/2026/01/01/tla-liveness/
25•ibobev•3h ago•1 comments

Microsoft kills official way to activate Windows 11/10 without internet

https://www.neowin.net/news/report-microsoft-quietly-kills-official-way-to-activate-windows-1110-...
199•josephcsible•4h ago•141 comments

Ask HN: Who wants to be hired? (January 2026)

95•whoishiring•12h ago•184 comments

The PGP Problem (2019)

https://www.latacora.com/blog/2019/07/16/the-pgp-problem/#the-answers
24•croemer•5d ago•26 comments

Blob Opera, Community Edition

https://opera.addy.ie
22•padolsey•1w ago•2 comments

Of Boot Vectors and Double Glitches: Bypassing RP2350's Secure Boot

https://streaming.media.ccc.de/39c3/relive/2149
5•aberoham•6d ago•0 comments

Chain Flinger

https://nealstephenson.substack.com/p/kdk-kinetik-der-kontinua-part-1-introduction
36•roomey•5d ago•7 comments

Accounting for Computer Scientists (2011)

https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scientists.html
82•tosh•10h ago•28 comments

Punkt. Unveils MC03 Smartphone

https://www.punkt.ch/blogs/news/punkt-unveils-mc03
129•ChrisArchitect•12h ago•121 comments

The rsync algorithm (1996) [pdf]

https://www.andrew.cmu.edu/course/15-749/READINGS/required/cas/tridgell96.pdf
103•vortex_ape•11h ago•9 comments

Uxn32: Uxn Emulator for Windows and Wine

https://github.com/randrew/uxn32
43•ibobev•5d ago•4 comments

Assorted less(1) tips

https://blog.thechases.com/posts/assorted-less-tips/
188•todsacerdoti•16h ago•44 comments