When reading about Race conditions in go, I came across runtime.gosched()
which I glanced over but did not clearly
understand. So went through the docs to understand what it does. This is what the
docs says it does:
Gosched yields the processor, allowing other goroutines to run. It does not suspend the current goroutine,
so execution resumes automatically.
When I read this, I did not clearly understand what it does, cause I did not understand what yield
meant. This is the best
definition that made sense in this context:
To give over possession of, as in deference or defeat; surrender.