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
Loading
Please register or sign in to comment