Properly size the list of waiters

This commit is contained in:
Benoit Steiner
2016-09-12 10:31:55 -07:00
parent a618094b62
commit eb6ba00cc8
2 changed files with 4 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface {
spinning_(0),
done_(false),
ec_(waiters_) {
waiters_.resize(num_threads);
// Calculate coprimes of num_threads.
// Coprimes are used for a random walk over all threads in Steal
// and NonEmptyQueueIndex. Iteration is based on the fact that if we take