Testing if submit one thread task successfully.
354 {
355
357
358 auto func = []() -> void
359 {
360 std::this_thread::sleep_for(std::chrono::seconds(2));
361 };
362
363 m_ThreadPool.SubmitThreadTask_LightWeight(0, func);
364
365
366 m_ThreadPool.Wait();
367
368 EXPECT_EQ(m_ThreadPool.GetInitThreadSize() ,nThreads );
369 EXPECT_EQ(m_ThreadPool.GetIdleThreadSize() ,nThreads );
371 EXPECT_EQ(m_ThreadPool.GetTasks() ,0 );
372 EXPECT_EQ(m_ThreadPool.GetThreadsCount() ,nThreads );
374 EXPECT_EQ(m_ThreadPool.IsPoolRunning() ,true );
375
376 for (auto& pair : m_ThreadPool.GetThreads())
377 {
378 EXPECT_EQ(pair.second->GetThreadTasksCount(),0);
379 }
380 }
#define SPICESTEST_PROFILE_FUNCTION()
constexpr uint32_t THREAD_MAX_IDLE_TIME