3 ms·
Is the OS not scheduling M runnable threads on N cores? Blocking/non-blocking is just an API distinction, and languages implement one in terms of the other.
by willvarfar 13y ago
Is the OS not scheduling M runnable threads on N cores? Blocking/non-blocking is just an API distinction, and languages implement one in terms of the other.
- laumars 13y agoGoroutines are not threads. You can have a dozen goroutines which would only run on a smaller subset of OS threads.
- willvarfar 13y agoThey are threads. Technically they are "green threads". The runtime does not map them to OS threads, although technically if it chose to it could, because goroutines are abstract things and the mapping to real threads is a platform decision.