News for hackers. Stuff that matters.
Re:Re: 100k Threads? (2002) by liquidpele on Saturday September 23, 2023 @09:03AM (#37622889)
You act like Java isn’t copying what every other language has had for years or decades. Green threads are not threads they’re just an async system in the existing runtime, they share one or more real threads as workers. They do that because creating real threads requires OS features like permission checking, memory management, cpu scheduling, etc. pick the right abstraction for the work.
Re:Re: 100k Threads? (2002) by H8crilA on Saturday September 23, 2023 @09:07AM (#37622908)
Also, green/virtual threads are overrated, IMHO. Just make system threads, it's not nearly as bad as people think, and it is a lot easier. You will likely want to cap max stack size (so that unintentional large stacks cause crashes instead of using up unreasonable amounts of memory) and perhaps tune a few other things.
Re:Re: 100k Threads? (2002) by ryanjshaw on Saturday September 23, 2023 @09:16AM (#37622968)
The big benefit I think is in libraries. I don't want to deal with 10 different ways of doing async in 10 different libraries, nor think about how to co-ordinate between them.
Re:Re: 100k Threads? (2002) by kaba0 on Saturday September 23, 2023 @09:44AM (#37623156)
Is every other language go and elixir?

Also, there are many different characteristic of any such system: M:N is not the impressive part at all.