diff options
| author | 2019-02-11 15:06:16 -0800 | |
|---|---|---|
| committer | 2019-02-12 19:03:53 +0000 | |
| commit | e5cdaf922129701ac9d4d25c1b22f80c486a0af6 (patch) | |
| tree | d5434dc5d035e28de1ceb5fc2f864824f2336933 /java/java.go | |
| parent | e48ff5bbd49a77ebd74b6464ace4e33a8dacf829 (diff) | |
Make OncePer.Once reentrant
The value constructor passed to OncePer.Once may call back into
Once. Replace the global mutex with a temporary channel stored
in the map using the key, and have callers for the same key
wait on the channel if they find it instead of a real value.
Test: TestOncePerReentrant
Change-Id: Ifa88a3c48981b5076b83f47fbdee5d26311725c6
Diffstat (limited to 'java/java.go')
0 files changed, 0 insertions, 0 deletions