MCPcopy Create free account
hub / github.com/PDAL/PDAL / PDAL_EXPORT ~ThreadPool

Function PDAL_EXPORT ~ThreadPool

pdal/util/ThreadPool.hpp:48–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46{
47
48class ThreadPool
49{
50public:
51 // After numThreads tasks are actively running, and queueSize tasks have
52 // been enqueued to wait for an available worker thread, subsequent calls
53 // to Pool::add will block until an enqueued task has been popped from the
54 // queue.
55 PDAL_EXPORT ThreadPool(std::size_t numThreads, int64_t queueSize = -1,
56 bool verbose = true) :
57 m_queueSize(queueSize),
58 m_numThreads(std::max<std::size_t>(numThreads, 1))
59 {
60 assert(m_queueSize != 0);
61 go();
62 }
63
64 PDAL_EXPORT ~ThreadPool()
65 { join(); }
66
67 ThreadPool(const ThreadPool& other) = delete;
68 ThreadPool& operator=(const ThreadPool& other) = delete;

Callers

nothing calls this directly

Calls 1

joinFunction · 0.85

Tested by

no test coverage detected