9#include "MantidKernel/DllConfig.h"
23class ThreadPoolRunnable;
43 void start(
double waitSec = 0.0);
45 void schedule(
const std::shared_ptr<Task> &task,
bool start =
false);
49 static size_t getNumPhysicalCores();
59 std::vector<std::unique_ptr<Poco::Thread>>
m_threads;
68 std::unique_ptr<ProgressBase>
m_prog;
A Thread Pool implementation that keeps a certain number of threads running (normally,...
ThreadPool & operator=(const ThreadPool &other)
std::vector< std::unique_ptr< Poco::Thread > > m_threads
Vector with all the threads that are started.
size_t m_numThreads
Number of cores used.
bool m_started
Have the threads started?
std::vector< std::unique_ptr< ThreadPoolRunnable > > m_runnables
Vector of the POCO-required classes to actually run in a thread.
std::unique_ptr< ProgressBase > m_prog
Progress reporter.
ThreadPool(const ThreadPool &)
std::unique_ptr< ThreadScheduler > m_scheduler
The ThreadScheduler instance taking care of task scheduling.
A First-In-First-Out Thread Scheduler.
The ThreadScheduler object defines how tasks are allocated to threads and in what order.
Helper class which provides the Collimation Length for SANS instruments.