mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Use plain_assert in destructors to avoid throwing in CXX11 tests where main.h owerwrites eigen_assert with a throwing version.
This commit is contained in:
@@ -90,8 +90,8 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface {
|
||||
}
|
||||
|
||||
// Join threads explicitly to avoid destruction order issues.
|
||||
for (size_t i = 0; i < num_threads_; i++) delete threads_[i];
|
||||
for (size_t i = 0; i < num_threads_; i++) delete queues_[i];
|
||||
for (int i = 0; i < num_threads_; i++) delete threads_[i];
|
||||
for (int i = 0; i < num_threads_; i++) delete queues_[i];
|
||||
#ifndef EIGEN_THREAD_LOCAL
|
||||
for (auto it : per_thread_map_) delete it.second;
|
||||
#endif
|
||||
@@ -298,7 +298,7 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface {
|
||||
// If we are shutting down and all worker threads blocked without work,
|
||||
// that's we are done.
|
||||
blocked_++;
|
||||
if (done_ && blocked_ == num_threads_) {
|
||||
if (done_ && blocked_ == static_cast<unsigned>(num_threads_)) {
|
||||
ec_.CancelWait(waiter);
|
||||
// Almost done, but need to re-check queues.
|
||||
// Consider that all queues are empty and all worker threads are preempted
|
||||
|
||||
Reference in New Issue
Block a user