MCPcopy Create free account
hub / github.com/alibaba/euler / StdThreadPool

Method StdThreadPool

euler/common/env_posix.cc:100–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98class StdThreadPool: public ThreadPool {
99 public:
100 StdThreadPool(const std::string& name, int num_threads)
101 : shutdown_(false), counter_(0) {
102 for (int i = 0; i < num_threads; ++i) {
103 job_queues_.emplace_back(new JobQueue<ThreadFunc>());
104 }
105 for (int i = 0; i < num_threads; ++i) {
106 threads_.emplace_back(new StdThread(name, [this, i] () { Loop(i); }));
107 }
108 }
109
110 ~StdThreadPool() override {
111 Shutdown();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected