mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-31 01:03:38 +08:00
Fix threadpool for c++14.
This commit is contained in:
parent
cd511a09aa
commit
dc1126e762
@ -153,7 +153,8 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface {
|
||||
void MaybeGetTask(Task* t) {
|
||||
PerThread* pt = GetPerThread();
|
||||
Queue& q = thread_data_[pt->thread_id].queue;
|
||||
if (*t = q.PopFront(); t->f) return;
|
||||
*t = q.PopFront();
|
||||
if (t->f != nullptr) return;
|
||||
if (num_threads_ == 1) {
|
||||
// For num_threads_ == 1 there is no point in going through the expensive
|
||||
// steal loop. Moreover, since NonEmptyQueueIndex() calls PopBack() on the
|
||||
|
Loading…
x
Reference in New Issue
Block a user