ing
This commit is contained in:
parent
1e7be8bc07
commit
b040fbf794
|
@ -2,6 +2,7 @@ package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"sync"
|
||||||
|
|
||||||
cda "git.loafle.net/commons_go/di/annotation"
|
cda "git.loafle.net/commons_go/di/annotation"
|
||||||
cdr "git.loafle.net/commons_go/di/registry"
|
cdr "git.loafle.net/commons_go/di/registry"
|
||||||
|
@ -16,9 +17,12 @@ type ProbeService struct {
|
||||||
cda.TypeAnnotation `annotation:"@overFlow:Service()"`
|
cda.TypeAnnotation `annotation:"@overFlow:Service()"`
|
||||||
|
|
||||||
RPCServlet cr.Servlet
|
RPCServlet cr.Servlet
|
||||||
|
sendMtx sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ps *ProbeService) Send(method string, params ...interface{}) error {
|
func (ps *ProbeService) Send(method string, params ...interface{}) error {
|
||||||
|
ps.sendMtx.RLock()
|
||||||
|
defer ps.sendMtx.RUnlock()
|
||||||
|
|
||||||
return ps.RPCServlet.Send(method, params...)
|
return ps.RPCServlet.Send(method, params...)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user