clang-format EC/ThreadPool.hpp
This commit is contained in:
parent
b4b0802e7c
commit
033a455e3e
1 changed files with 4 additions and 3 deletions
|
@ -29,8 +29,8 @@ using ThreadStacksType = std::deque<ThreadStackType>;
|
||||||
using ThreadStacksMutexesT = std::deque<std::mutex>;
|
using ThreadStacksMutexesT = std::deque<std::mutex>;
|
||||||
using ThreadCountersT = std::deque<std::atomic_uint>;
|
using ThreadCountersT = std::deque<std::atomic_uint>;
|
||||||
using PtrsHoldT = std::deque<std::atomic_bool>;
|
using PtrsHoldT = std::deque<std::atomic_bool>;
|
||||||
using PointersT =
|
using PointersT = std::tuple<ThreadStackType *, std::mutex *,
|
||||||
std::tuple<ThreadStackType *, std::mutex *, std::atomic_uint *, std::atomic_bool *>;
|
std::atomic_uint *, std::atomic_bool *>;
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -196,7 +196,8 @@ class ThreadPool {
|
||||||
if (std::get<0>(pointers)) {
|
if (std::get<0>(pointers)) {
|
||||||
do {
|
do {
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(*std::get<1>(pointers));
|
std::lock_guard<std::mutex> lock(
|
||||||
|
*std::get<1>(pointers));
|
||||||
if (std::get<0>(pointers)->empty()) {
|
if (std::get<0>(pointers)->empty()) {
|
||||||
std::get<3>(pointers)->store(false);
|
std::get<3>(pointers)->store(false);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue