mirror of
https://github.com/gogs/gogs.git
synced 2025-12-24 09:10:07 +01:00
modules/sync: minor field refactor
This commit is contained in:
@@ -50,12 +50,12 @@ func (q *UniqueQueue) AddFunc(id interface{}, fn func()) {
|
||||
}
|
||||
|
||||
idStr := com.ToStr(id)
|
||||
q.table.lock.Lock()
|
||||
q.table.Lock()
|
||||
q.table.pool[idStr] = true
|
||||
if fn != nil {
|
||||
fn()
|
||||
}
|
||||
q.table.lock.Unlock()
|
||||
q.table.Unlock()
|
||||
q.queue <- idStr
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user