close issue of #337 (#347)

master
Kevin Wan 4 years ago committed by GitHub
parent 0786862a35
commit 01060cf16d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)) {
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()
delete(g.calls, key)
g.lock.Unlock()

Loading…
Cancel
Save