I am debugging a program written in go via Goland. In the debugger, I can choose between different goroutines that are running. I found alongside my goroutines there is a lot of other goroutines named runtime.gopark and I suspect these are other threads waiting in the thread pool for a job. However, I couldn't find any answer online. Is that so? If not, what is it actually doing?
P.S. Here is a photo of the incident:
runtime.gopark
. The function has documentation just above its definition.gopark
. That's not the only reason, but it's a pretty likely one.runtime.gopark
is the name of a function that the goroutine happens to be executing.