3 ms·
goroutines aren't really green threads, they're more lightweight than conventional green thread implementations due to having a segmented stack. Millions of gor
by zik 5y ago
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/ https://blog.cloudflare.com/how-stacks-are-handled-in-go/
- kortilla 5y agoThey are cheaper but conceptually aren’t any different.
- lucian1900 5y agoYou can run that many Erlang processes or more. Millions is typical of green thread implementations.
- nasretdinov 5y agoBy the way, while Go did initially have segmented stacjs, they've long abandoned it in favour of a contiguous one.