3 ms·
I'm a go fanboi, but to be fair, goroutines are now more preemptive, but not completely. In practice that means that if you call a function somewhere in your i
by shanemhansen 13y ago
I'm a go fanboi, but to be fair, goroutines are now more preemptive, but not completely.
In practice that means that if you call a function somewhere in your infinite loop, you'll get preempted. It's still possible for a single goroutine to steal an os thread.
Practically speaking though, I feel like nobody should be scared away from go due to it's lack of full pre-emption. Seriously, don't write an infinite loop with no function calls.