3 ms·
Yes, race conditions are definitely common. Thank you for pointing out the race condition in that example! That code is intentionally simplified to make a poin
by kylequest 8y ago
Yes, race conditions are definitely common. Thank you for pointing out the race condition in that example!
That code is intentionally simplified to make a point about the scheduling gotcha :-) The idea there was to show that a tight loop in one goroutine ( where the scheduler doesn't have an opportunity to execute) can prevent other goroutines from executing.