feat optimize thrad_pool
Some checks failed
linux-x64-gcc / linux-gcc (Release) (push) Successful in 1m59s
linux-arm-gcc / linux-gcc-armhf (push) Successful in 2m20s
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 2m36s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Successful in 2m44s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Successful in 3m9s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Has been cancelled
Some checks failed
linux-x64-gcc / linux-gcc (Release) (push) Successful in 1m59s
linux-arm-gcc / linux-gcc-armhf (push) Successful in 2m20s
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 2m36s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Successful in 2m44s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Successful in 3m9s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Has been cancelled
This commit is contained in:
parent
50c3456f65
commit
907d39108f
@ -60,10 +60,10 @@ TEST_SUITE("ThreadPool")
|
|||||||
delete tp;
|
delete tp;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("10^6 task test")
|
TEST_CASE("10^5 task test")
|
||||||
{
|
{
|
||||||
sled::ThreadPool *tp = new sled::ThreadPool();
|
sled::ThreadPool *tp = new sled::ThreadPool();
|
||||||
const int task_num = 1E4;
|
const int task_num = 1E5;
|
||||||
sled::WaitGroup wg(task_num);
|
sled::WaitGroup wg(task_num);
|
||||||
for (int i = 0; i < task_num; i++) {
|
for (int i = 0; i < task_num; i++) {
|
||||||
tp->PostTask([wg] { wg.Done(); });
|
tp->PostTask([wg] { wg.Done(); });
|
||||||
|
Loading…
Reference in New Issue
Block a user