>> It ought to be impossible, because printlock increments mp.locks.
Thanks, realized it's NOT a problem with printlock/printunlock.
>> Have you seen this happen?
Not yet with normal program, but a deadlock could be produced with the
diagnostic change to mgcsweep.go (say, running ./make.bash
>> Have you seen this happen? It ought to be impossible, because
>> printlock increments mp.locks. When mp.locks is not zero the M can't
>> be preempted and the goroutine can't block.
Not yet with normal program, but a deadlock could be produced with the
diagnostic change to mgcsweep.go (say,
Go doesn't have file scoped variables, only global variables and local
variables declared in functions, so your "file" scope variables are global
to their package.
Global variables aren't inherently bad, that's a bit of voodoo that some
ideological languages introduced, and people believe without