返回 DeepSeek-Reasonix
project_lock.go
根目录 / internal / taskcatalog / project_lock.go
1 package taskcatalog
2
3 import "sync"
4
5 func (c *Catalog) lockProject(projectKey string) func() {
6 value, _ := c.projectLocks.LoadOrStore(projectKey, &sync.Mutex{})
7 mu := value.(*sync.Mutex)
8 mu.Lock()
9 return mu.Unlock
10 }
11
11 lines GO