mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
异步队列新增Get方式
This commit is contained in:
@@ -94,3 +94,9 @@ func (q *SyncQueue) IsClose() (v bool) {
|
||||
q.lock.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
func (q *SyncQueue) Get(i int) interface{} {
|
||||
q.lock.Lock()
|
||||
defer q.lock.Unlock()
|
||||
return q.buffer.Get(i)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user