mirror of
https://github.com/golang/sync
synced 2020-06-03 17:03:44 +00:00
56d357773e
When Forget was called, we delete key associated with current call from map. When that call is done, it does delete key again, causing the same key set by other call after Forget lost. To fix it, adding a boolean value to check whether the call is forgotten, the call only does delete key if Forget is not called. Fixes golang/go#31420 Change-Id: I9708352ca3ff76c77f659916b37a496fdeb480d2 Reviewed-on: https://go-review.googlesource.com/c/sync/+/171897 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> |
||
---|---|---|
.. | ||
singleflight_test.go | ||
singleflight.go |