Get the latest tech news
Understanding the Go Scheduler
↑ ↓
Trace visualization when non-cooperative preemption happensBy zooming out (pressing ‘S’) and scrolling slightly to the right, it can be observed that G10 is later replaced by another goroutine, G9, which is the next instance running the fibonacci function. Another important point is that whenever a processor P is in syscall state, it can't be taken up by another thread M to execute code until sysmon happens to seize it or until the system call is completed. Due to the performance limitations of select and poll —as explained in this —Go avoids them in favor of more scalable alternatives: epoll on Linux, kqueue on Darwin, and IOCP on Windows.
Or read this on Hacker News