locking seems to work in or out of the .proto file

This commit is contained in:
Jeff Carr 2025-01-09 15:56:03 -06:00
parent 65aa8e85b1
commit fe98085712
2 changed files with 2 additions and 3 deletions

View File

@ -8,11 +8,10 @@ vet:
@GO111MODULE=off go vet @GO111MODULE=off go vet
build: build:
rm -f fruit.newsort.pb.go
GO111MODULE=off go build GO111MODULE=off go build
auto: auto:
../autogenpb --proto fruit.proto --package main ../autogenpb --proto fruit.proto --package main --mutex
goimports: goimports:
goimports -w *.go goimports -w *.go

View File

@ -191,7 +191,7 @@ func (pf *File) appendUnique(w io.Writer, blah *MsgName, names map[string]string
var LOCK string = pf.Bases.Lockname var LOCK string = pf.Bases.Lockname
if argv.Mutex { if argv.Mutex {
LOCK = pf.Bases.Name + ".Lock" LOCK = pf.Bases.Lockname
} else { } else {
LOCK = "all.Lock" LOCK = "all.Lock"
} }