Compare commits

...

2 Commits

2 changed files with 15 additions and 6 deletions

View File

@ -1,5 +1,17 @@
# CHANGELOG
## v0.6.4 (2023-08-19)
### Added
- feat: use mutex instead of rwmutex (2023-08-19)
### Others
- build: bump go-github v54 (2023-08-17)
- chore(changelog): generate v0.6.3 (2023-08-16)
## v0.6.3 (2023-08-16)
### Others

View File

@ -48,7 +48,7 @@ func (a *action) Overlook(c *cli.Context) error {
mGHRepoData := make(map[string]struct{})
p := pool.New().WithMaxGoroutines(maxPoolGoroutine)
var mMutex sync.RWMutex
var mMutex sync.Mutex
var listMutex sync.Mutex
for module := range mapImportedModules {
module := module
@ -65,14 +65,11 @@ func (a *action) Overlook(c *cli.Context) error {
}
name := parts[0]
mMutex.RLock()
mMutex.Lock()
if _, ok := mGHRepoData[name]; ok {
mMutex.RUnlock()
mMutex.Unlock()
return
}
mMutex.RUnlock()
mMutex.Lock()
mGHRepoData[name] = struct{}{}
mMutex.Unlock()