MCPcopy Create free account
hub / github.com/comaps/comaps / ThreadPool

Class ThreadPool

libs/base/thread_pool.hpp:14–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12{
13
14class ThreadPool
15{
16public:
17 typedef std::function<void(threads::IRoutine *)> TFinishRoutineFn;
18
19 ThreadPool(size_t size, TFinishRoutineFn const & finishFn);
20 ~ThreadPool();
21
22 // ThreadPool will not delete routine. You can delete it in TFinishRoutineFn.
23 void PushBack(threads::IRoutine * routine);
24 void PushFront(threads::IRoutine * routine);
25
26 // - calls Cancel for the current processing routines
27 // - joins threads
28 // - calls Cancel for the remains routines in queue
29 void Stop();
30
31private:
32 class Impl;
33 Impl * m_impl;
34};
35
36} // namespace base

Callers 3

download_mwm_listFunction · 0.90
mainFunction · 0.90
download_filesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected