fix can't find to_string
All checks were successful
linux-mips64-gcc / linux-gcc-mips64el (push) Successful in 1m10s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Successful in 1m20s
linux-x64-gcc / linux-gcc (push) Successful in 2m2s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Successful in 1m19s
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 1m24s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Successful in 1m3s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Successful in 1m5s
All checks were successful
linux-mips64-gcc / linux-gcc-mips64el (push) Successful in 1m10s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Successful in 1m20s
linux-x64-gcc / linux-gcc (push) Successful in 2m2s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Successful in 1m19s
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 1m24s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Successful in 1m3s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Successful in 1m5s
This commit is contained in:
parent
7f0131a9cb
commit
83772e6506
@ -1,5 +1,4 @@
|
||||
#include "thread_pool.h"
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace ulib {
|
||||
ThreadPool::ThreadPool(int max_thread_num,
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define ULIB_SRC_ULIB_SYSTEM_THREAD_POOL_H_
|
||||
|
||||
#include "thread.h"
|
||||
#include <fmt/format.h>
|
||||
#include "ulib/log/log.h"
|
||||
#include "ulib/concorrency/condition_variable.h"
|
||||
#include "ulib/concorrency/mutex.h"
|
||||
@ -39,7 +40,8 @@ public:
|
||||
tasks_.emplace([task]() { (*task)(); });
|
||||
if (tasks_.size() > idle_thread_num_
|
||||
&& workers_.size() < max_thread_num_) {
|
||||
AddThread(thread_pool_name_ + std::to_string(workers_.size()));
|
||||
AddThread(thread_pool_name_
|
||||
+ fmt::format("{}", workers_.size()));
|
||||
}
|
||||
if (tasks_.size() > 1) {
|
||||
tasks_cond_.NotifyAll();
|
||||
|
Loading…
x
Reference in New Issue
Block a user