13 #include <condition_variable>
48 return mTask.get_future();
62 std::unique_lock<std::mutex> lock(
mMutex);
66 std::lock_guard<std::mutex> lock(
mMutex);
133 Answer runBackends(
const std::vector<Module*>& _modules,
bool _final,
bool _full, carl::Variable _objective);
std::condition_variable mConditionVariable
A base class for all kind of theory solving methods.
Task(T &&task, const Module *module, std::size_t _index)
bool operator<(const Task &rhs) const
std::packaged_task< Answer()> mTask
std::future< Answer > getFuture()
std::size_t mConditionalIndex
const Module * getModule() const
std::size_t conditionalIndex() const
std::vector< BackendSynchronisation * > mBackendSynchros
void submitBackend(Task *task)
bool notify(std::size_t index)
std::mutex mThreadCreationMutex
std::atomic< std::size_t > mNumberThreads
Initialized with 1: There is always the main thread in the beginning.
Answer runBackends(const std::vector< Module * > &_modules, bool _final, bool _full, carl::Variable _objective)
const std::size_t mMaxThreads
std::atomic< std::size_t > mCounter
Initialized with 1: There is always the main thread in the beginning.
ThreadPool(std::size_t maxThreads)
std::priority_queue< Task * > mQueue
std::mutex mBackendSynchrosMutex
void deleteTask(Task *task)
bool shallBeSkipped(std::size_t index)
Class to create the formulas for axioms.
std::vector< std::size_t > Priority
Answer
An enum with the possible answers a Module can give.