2 ms·
> Having lightweight userland threads fundamentally changes the way that you write concurrent programs. There is no need to worry about creating too many thread
by dragontamer 5y ago
> Having lightweight userland threads fundamentally changes the way that you write concurrent programs. There is no need to worry about creating too many threads or of thread creation being too heavy. Old school patterns like process/thread/goroutine per connection are very natural to write in Go and result in dead simple code that performs well under load.
Well... there's still a problem in the tens-of-millions of Goroutines.
But the issue is that OS-threads generally had issues at the ~100,000 of OS-threads. Making something "more lightweight" than pthreads makes sense, because 10,000,000 coroutines is a fundamentally different program design than 100,000 pthreads.