3 ms·
I think the Go scheduler makes a good case for multiplexing a large number of user-mode threads (or goroutines) over a limited number of OS threads: whenever a
by ciconia 6y ago
I think the Go scheduler makes a good case for multiplexing a large number of user-mode threads (or goroutines) over a limited number of OS threads: whenever a goroutine needs to make a blocking syscall (e.g. writing to a socket), the work is offloaded to a "network poller" thread, and meanwhile the Go scheduler can continue to service other runnable goroutines.
It seems to me that this allows Go programs to maximize the use of their OS-thread time slices without being preempted on each syscall. Does anybody care to comment on how this impacts throughput and latency?