3 ms·
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 exist
by liquidpele 3y ago
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.
- H8crilA 3y agoAlso, 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.
- ryanjshaw 3y agoThe 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.
- kaba0 3y agoIs 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.