PeterSommerlad / SC22WG21_Papers

My submissions to SC22WG21 C++ ISO/IEC standardization group
43 stars 13 forks source link

Optimize release_lock #2

Closed jwakely closed 8 years ago

jwakely commented 8 years ago

Avoid doing a second lookup to erase the lock from the map.

Comparing the iterator to end shouldn't be necessary, but handles the case where the ostream's stream buffer is replaced between the calls to get_lock() and release_lock().