I see. GOMAXPROCS is the number of goroutines that may run
simultaneously. See
https://pkg.go.dev/runtime#GOMAXPROCS . So if
GOMAXPROCS is set to 4, then up to 4 goroutines may be running at one
time. If there are more goroutines ready to run, they will block
until one of those 4 goroutines pauses for some reason. If the 4
goroutines keep running for long enough without pausing, the runtime
will interrupt one of them to give other goroutines a chance to run.
All of this is true whether or not any goroutines have called
runtime.LockOSThread. The LockOSThread function affects which thread
is used to run a goroutine. It does not otherwise affect the
scheduler.
Ian