News for hackers. Stuff that matters.
Re:Java Virtual Threads Ate My Memory: A Web Crawler's Tale ... by fjasdfwa on Friday May 30, 2025 @07:41PM (#44140782)
> Virtual Threads Ate My Memory

From what I see, It's a developer trade off.

If you want to save on memory then you need to drop down to callbacks, promise chains, or async-await sugar that is a compiler transform to a state machine.

But if you do that, then you will write a blog complaining about the boilerplate!

I think Zig had an ability to kind of give you the best of both worlds. A zig expert would need to correct me on this.

Re:Java Virtual Threads Ate My Memory: A Web Crawler's Tale ... by written-beyond on Saturday May 31, 2025 @06:32AM (#44143311)
I thought rusts async compiles into a state machine.