News for hackers. Stuff that matters.
Re:Golang’s most important feature is invisible by travisd on Saturday January 22, 2022 @08:30PM (#30042752)
My impression of the article is just that the author is a fan of green threads (goroutines). Green threads don’t really make sense without an integration into some kind of IO runtime, so calling out how Go does do this seems moot. Other languages with green threads also with this way (Julia comes to mind).
Re:Golang’s most important feature is invisible by karmakaze on Saturday January 22, 2022 @09:22PM (#30043026)
The article is not very well informed. It doesn't even make a distinction between os threads and green threads.

> To get this performance out of Java you would need to add threadpools, futures or some other async library.

What Java needs to be as efficient is the work of Project Loom: Fibers and Continuations. Go also has value types (e.g. arrays and nested structs with inline memory layout) that's the work of Java's Project Valhalla.

Re:Golang’s most important feature is invisible by zik on Sunday January 23, 2022 @04:14AM (#30044760)
goroutines aren't really green threads, they're more lightweight than conventional green thread implementations due to having a segmented stack. Millions of goroutines can run comfortably on a standard machine. This isn't possible with any green thread implementation I've seen.

https://blog.cloudflare.com/how-stacks-are-handled-in-go/

Re:Golang’s most important feature is invisible by lucian1900 on Sunday January 23, 2022 @05:50AM (#30045222)
You can run that many Erlang processes or more.

Millions is typical of green thread implementations.

Re:Golang’s most important feature is invisible by nasretdinov on Sunday January 23, 2022 @07:47AM (#30045766)
By the way, while Go did initially have segmented stacjs, they've long abandoned it in favour of a contiguous one.
Re:Golang’s most important feature is invisible by kortilla on Sunday January 23, 2022 @05:15AM (#30045033)
They are cheaper but conceptually aren’t any different.