Commit 398f8373 authored by Steve O'Brien's avatar Steve O'Brien Committed by facebook-github-bot-1

ThreadLocalDetail: fix bug just introduced w/ recent change to constexpr-ctor style class

Summary: Small, silly bug which is triggered when there are no keys to unregister, invalidating the current size of the structure.

Reviewed By: yzhan

Differential Revision: D2712604

fb-gh-sync-id: f6f031936d8e4e458b49c08714f42cb2eec4c4fe
parent d93a7913
......@@ -184,8 +184,8 @@ class PthreadKeyUnregister {
~PthreadKeyUnregister() {
std::lock_guard<std::mutex> lg(mutex_);
while (size_--) {
pthread_key_delete(keys_[size_]);
while (size_) {
pthread_key_delete(keys_[--size_]);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment