Testing if submit one thread task successfully.
257 {
258
260
261 auto func = []() -> void
262 {
263 std::this_thread::sleep_for(std::chrono::seconds(2));
264 };
265
266 m_ThreadPool.SubmitThreadTask_LightWeight(0, func);
267
268
269 m_ThreadPool.Wait();
270
271 EXPECT_EQ(m_ThreadPool.GetInitThreadSize() ,nThreads );
272 EXPECT_EQ(m_ThreadPool.GetIdleThreadSize() ,nThreads );
274 EXPECT_EQ(m_ThreadPool.GetTasks() ,0 );
275 EXPECT_EQ(m_ThreadPool.GetThreadsCount() ,nThreads );
276 EXPECT_EQ(m_ThreadPool.GetThreadIdleTimeOut(),10 );
277 EXPECT_EQ(m_ThreadPool.IsPoolRunning() ,true );
278
279 for (auto& pair : m_ThreadPool.GetThreads())
280 {
281 EXPECT_EQ(pair.second->GetThreadTasksCount(), 0);
282 }
283 }
#define SPICESTEST_PROFILE_FUNCTION()