Skip to content
Commit e5cdaf92 authored by Colin Cross's avatar Colin Cross
Browse files

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
parent e48ff5bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment