mirror of
https://github.com/duanhf2012/origin.git
synced 2026-03-06 22:27:36 +08:00
异步队列新增Get方式
This commit is contained in:
@@ -209,7 +209,6 @@ func (slf *CCluster) Start() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//Node.servicename.methodname
|
|
||||||
//servicename.methodname
|
//servicename.methodname
|
||||||
//_servicename.methodname
|
//_servicename.methodname
|
||||||
func (slf *CCluster) Call(NodeServiceMethod string, args interface{}, reply interface{}) error {
|
func (slf *CCluster) Call(NodeServiceMethod string, args interface{}, reply interface{}) error {
|
||||||
|
|||||||
@@ -94,3 +94,9 @@ func (q *SyncQueue) IsClose() (v bool) {
|
|||||||
q.lock.Unlock()
|
q.lock.Unlock()
|
||||||
return
|
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