Get the latest tech news

From Async/Await to Virtual Threads


A follow-up to how I wish async would work.

For instance, in Trio, which is a Python async library, the decision was made that you have to always have the equivalent of a thread group — they call it a nursery — to spawn an operation. I can imagine various different alternatives for this, such as having a default thread group hang around for background tasks that is implicitly joined when the process is shutting down. There are a lot of questions open about this, particularly in the context of Python, but the idea of no longer having to deal with colored functions really appeals to me and I hope we can explore it a bit.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of virtual threads

virtual threads

Photo of Async/Await

Async/Await

Related news:

News photo

Java Virtual Threads Ate My Memory: A Web Crawler's Tale of Speed vs. Memory

News photo

JEP Draft: Adapt Object Monitors for Virtual Threads

News photo

Java 21 Virtual Threads – Dude, Where's My Lock?