try mutex locks again
This commit is contained in:
parent
f585edc192
commit
434f62a7e6
|
@ -50,7 +50,9 @@ func (all *Repos) NewGoRepo(fullpath string, gopath string) (*Repo, error) {
|
|||
}
|
||||
|
||||
// enforces GoPath is unique
|
||||
func (all *Repos) AppendByGoPath(newr *Repo) bool {
|
||||
// TODO: deprecate this (?)
|
||||
// mutex's should finally work in the autogenpb protobuf code
|
||||
func (all *Repos) AppendByGoPathOld(newr *Repo) bool {
|
||||
// all.RLock()
|
||||
repoMu.RLock()
|
||||
|
||||
|
@ -64,7 +66,6 @@ func (all *Repos) AppendByGoPath(newr *Repo) bool {
|
|||
// all.RUnlock()
|
||||
repoMu.RUnlock()
|
||||
|
||||
// all.Repos = append(all.Repos, newr)
|
||||
all.Append(newr)
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ message GoInfo { // `autogenpb
|
|||
bool gitIgnoresGoSum = 12; // does .gitignore ignore go.mod & go.sum?
|
||||
}
|
||||
|
||||
message Repo { // `autogenpb:marshal` `autogenpb:nomutex`
|
||||
message Repo { // `autogenpb:marshal`
|
||||
string namespace = 1; // `autogenpb:unique` `autogenpb:sort` // this repo is 'go.wit.com/lib/protobuf/gitpb'
|
||||
string fullPath = 2; // `autogenpb:unique` `autogenpb:sort` // the OS path to the .git directory: '/home/devel/golang.org/x/tools'
|
||||
string masterBranchName = 3; // git 'main' or 'master' branch name
|
||||
|
@ -70,7 +70,7 @@ message Repo { // `autogenpb
|
|||
GitConfig gitConfig = 25; // protobuf of the current .git/config
|
||||
}
|
||||
|
||||
message Repos { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:nomutex` `autogenpb:gui`
|
||||
message Repos { // `autogenpb:marshal` `autogenpb:sort` `autogenpb:gui`
|
||||
string uuid = 1; // `autogenpb:uuid:8daaeba1-fb1f-4762-ae6e-95a55d352673`
|
||||
string version = 2; // `autogenpb:version:v4`
|
||||
repeated Repo repos = 3; // `autogenpb:append` // generate AppendUnique() function for this
|
||||
|
|
Loading…
Reference in New Issue