feat optimize thrad_pool
This commit is contained in:
parent
50c3456f65
commit
907d39108f
@ -60,10 +60,10 @@ TEST_SUITE("ThreadPool")
|
||||
delete tp;
|
||||
}
|
||||
|
||||
TEST_CASE("10^6 task test")
|
||||
TEST_CASE("10^5 task test")
|
||||
{
|
||||
sled::ThreadPool *tp = new sled::ThreadPool();
|
||||
const int task_num = 1E4;
|
||||
const int task_num = 1E5;
|
||||
sled::WaitGroup wg(task_num);
|
||||
for (int i = 0; i < task_num; i++) {
|
||||
tp->PostTask([wg] { wg.Done(); });
|
||||
|
Loading…
x
Reference in New Issue
Block a user