#include "CThreadHelper.h" #include #include /* * CThreadHelper.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * * License: GNU General Public License v2.0 or later * Full text of license available in license.txt file, in main folder * */ CThreadHelper::CThreadHelper(std::vector > *Tasks, int Threads) { currentTask = 0; amount = Tasks->size(); tasks = Tasks; threads = Threads; } void CThreadHelper::run() { boost::thread_group grupa; for(int i=0;i= amount) { rtinm.unlock(); break; } else { ++currentTask; rtinm.unlock(); (*tasks)[pom](); } } }