aboutsummaryrefslogtreecommitdiff
path: root/modules/sync/unique_queue.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/sync/unique_queue.go')
-rw-r--r--modules/sync/unique_queue.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/sync/unique_queue.go b/modules/sync/unique_queue.go
index 3f3c1c86..61b0aa5b 100644
--- a/modules/sync/unique_queue.go
+++ b/modules/sync/unique_queue.go
@@ -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
}