1 #ifndef OPENMM_THREAD_POOL_H_
2 #define OPENMM_THREAD_POOL_H_
36 #include "windowsExport.h"
67 int getNumThreads()
const;
71 void execute(Task& task);
81 void waitForThreads();
88 int numThreads, waitCount;
89 std::vector<pthread_t> thread;
90 std::vector<ThreadData*> threadData;
91 pthread_cond_t startCondition, endCondition;
106 virtual void execute(
ThreadPool& pool,
int threadIndex) = 0;
111 #endif // OPENMM_THREAD_POOL_H_
A ThreadPool creates a set of worker threads that can be used to execute tasks in parallel...
Definition: ThreadPool.h:52