Update threaded_queue.h (#82)

https://en.cppreference.com/w/cpp/language/fold
This commit is contained in:
Amos Bird 2018-09-27 08:47:03 +08:00 committed by Fangrui Song
parent cff6c4714c
commit 93b5fa198c

View File

@ -36,8 +36,7 @@ private:
}
template <size_t... Is> void unlock_impl(std::index_sequence<Is...>) {
(void)std::initializer_list<int>{
(std::get<Is>(tuple_)->mutex_.unlock(), 0)...};
(std::get<Is>(tuple_)->mutex_.unlock(), ...);
}
std::tuple<Queue...> tuple_;