// clear the wait flag so that threads will no longer wait for the main
// thread signal
wait_ = false;
- // wake all thread if waiting for main thread
+ // wake all thread if waiting for main thread signal
wait_cv_.notify_all();
}
for (uint32_t i = 0; i < items_count; ++i) {
thread_pool.add(call_back);
}
- // the item count sould match
+ // the item count should match
ASSERT_EQ(thread_pool.count(), items_count);
}
// calling create with false should not create threads and should remove all
// queued items
thread_pool.create(thread_count, false);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// calling destroy should clear all threads and should remove all queued
// items
thread_pool.destroy();
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// do it once again to check if it works
thread_pool.destroy();
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// calling create with false should not create threads and should remove all
// queued items
thread_pool.create(thread_count, false);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// calling create with true should create threads and should remove all
// queued items
thread_pool.create(thread_count);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should match
ASSERT_EQ(thread_pool.size(), thread_count);
// wait for all items to be processed
waitTasks(thread_count, items_count);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should match
ASSERT_EQ(thread_pool.size(), thread_count);
// calling destroy should clear all threads and should remove all queued
// items
thread_pool.destroy();
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// do it once again to check if it works
thread_pool.destroy();
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// calling create with true should create threads and should remove all
// queued items
thread_pool.create(thread_count);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should match
ASSERT_EQ(thread_pool.size(), thread_count);
// wait for all items to be processed
waitTasks(thread_count, items_count);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should match
ASSERT_EQ(thread_pool.size(), thread_count);
// calling destroy should clear all threads and should remove all queued
// items
thread_pool.destroy();
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// calling start should create the threads and should keep the queued items
thread_pool.start(thread_count);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should match
ASSERT_EQ(thread_pool.size(), thread_count);
// do it once again to check if it works
thread_pool.start(thread_count);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should match
ASSERT_EQ(thread_pool.size(), thread_count);
// calling stop with false should clear all threads and should keep queued
// items
thread_pool.stop();
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// do it once again to check if it works
thread_pool.stop();
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
for (uint32_t i = 0; i < items_count; ++i) {
thread_pool.add(call_back);
}
- // the item count sould match
+ // the item count should match
ASSERT_EQ(thread_pool.count(), items_count);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// calling stop with false should clear all threads and should keep queued
// items
thread_pool.stop();
- // the item count sould match
+ // the item count should match
ASSERT_EQ(thread_pool.count(), items_count);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// calling stop with true should clear all threads and should remove all
// queued items
thread_pool.stop(true);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// calling start should create the threads and should keep the queued items
thread_pool.start(thread_count);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), thread_count);
// wait for all items to be processed
waitTasks(thread_count, items_count);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should match
ASSERT_EQ(thread_pool.size(), thread_count);
// calling stop with false should clear all threads and should keep queued
// items
thread_pool.stop();
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
for (uint32_t i = 0; i < items_count; ++i) {
thread_pool.add(call_back);
}
- // the item count sould match
+ // the item count should match
ASSERT_EQ(thread_pool.count(), items_count);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);
// wait for all items to be processed
waitTasks(thread_count, items_count);
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should match
ASSERT_EQ(thread_pool.size(), thread_count);
// calling stop with false should clear all threads and should keep queued
// items
thread_pool.stop();
- // the item count sould be 0
+ // the item count should be 0
ASSERT_EQ(thread_pool.count(), 0);
// the thread count should be 0
ASSERT_EQ(thread_pool.size(), 0);