mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-13 18:00:00 +08:00
@@ -70,8 +70,6 @@ func (g *sharedGroup) createCall(key string) (c *call, done bool) {
|
|||||||
|
|
||||||
func (g *sharedGroup) makeCall(c *call, key string, fn func() (interface{}, error)) {
|
func (g *sharedGroup) makeCall(c *call, key string, fn func() (interface{}, error)) {
|
||||||
defer func() {
|
defer func() {
|
||||||
// delete key first, done later. can't reverse the order, because if reverse,
|
|
||||||
// another Do call might wg.Wait() without get notified with wg.Done()
|
|
||||||
g.lock.Lock()
|
g.lock.Lock()
|
||||||
delete(g.calls, key)
|
delete(g.calls, key)
|
||||||
g.lock.Unlock()
|
g.lock.Unlock()
|
||||||
|
|||||||
Reference in New Issue
Block a user