5 ms·
No, the article correctly points out: > A thread is only 3 times as large as a goroutine. Absolute numbers are also significant: 10k threads require only 100 m
by eeZah7Ux 6y ago
No, the article correctly points out:
> A thread is only 3 times as large as a goroutine. Absolute numbers are also significant: 10k threads require only 100 megabytes of overhead. If the application does 10k concurrent things, 100mb might be negligible.
If it's still not clear: if your application has a good reason to run 10k parallel tasks it's most likely doing something complex that requires plenty of RAM.
It's very unlikely that you really have to save those 100MB of RAM and at the same time you cannot rethink the architecture to stop using this level of parallelism.
And even so, that would justify using a coroutine library, not a whole programming language.