rename sharedcalls to singleflight (#1017)

This commit is contained in:
Kevin Wan
2021-09-09 18:06:27 +08:00
committed by GitHub
parent f070d447ef
commit 5cc9eb0de4
11 changed files with 49 additions and 39 deletions

View File

@@ -15,7 +15,7 @@ type RpcProxy struct {
backend string
clients map[string]Client
options []internal.ClientOption
sharedCalls syncx.SharedCalls
sharedCalls syncx.SingleFlight
lock sync.Mutex
}
@@ -25,7 +25,7 @@ func NewProxy(backend string, opts ...internal.ClientOption) *RpcProxy {
backend: backend,
clients: make(map[string]Client),
options: opts,
sharedCalls: syncx.NewSharedCalls(),
sharedCalls: syncx.NewSingleFlight(),
}
}