4 ms·
> The most commonly cited drawback of OS-level threads is that they use a lot of RAM. This is not true on Linux. I was under the impression this was context sw
by gbrown_ 6y ago
> The most commonly cited drawback of OS-level threads is that they use a lot of RAM. This is not true on Linux.
I was under the impression this was context switching rather than memory usage, which I haven't seen much about when these models are compared.
- zlynx 6y agoGoroutines had excellent context switching back when Go preferred to run in a single thread. Version 1.3 or so? Now that Go defaults to multiple threads it has lost all of that advantage. Goroutine switching and channel send/receive has to apply all of the locking that any multithreaded program has to use.
- rurban 6y agoYou have to use locking only with inferior frameworks, who never heard of lockless threading or non-blocking IO. Locking also makes concurrency not only slow but also unsafe.