24 using Task = std::function<void()>;
48 virtual size_t size()
const = 0;
Interface for a thread pool.
virtual void start()=0
Start all threads in the pool.
virtual ~IThreadPool()=default
virtual size_t size() const =0
Get the number of threads in the pool.
std::function< void()> Task
virtual void enqueue(Task task)=0
Enqueue a task to be executed by the thread pool.
virtual void stop()=0
Stop all threads and clean up resources.