Add notifier and delete Thread class
This commit is contained in:
parent
23a0b8f77b
commit
3196ba2bcf
10 changed files with 8 additions and 256 deletions
|
|
@ -27,8 +27,6 @@ ParadisEO WebSite : http://paradiseo.gforge.inria.fr
|
|||
Contact: paradiseo-help@lists.gforge.inria.fr
|
||||
*/
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
template<class EOT, class Policy>
|
||||
paradiseo::smp::Scheduler<EOT,Policy>::Scheduler(unsigned workersNb) :
|
||||
workers(workersNb),
|
||||
|
|
@ -75,7 +73,7 @@ void paradiseo::smp::Scheduler<EOT,Policy>::operator()(eoUF<EOT&, void>& func, e
|
|||
|
||||
// Starting threads
|
||||
for(unsigned i = 0; i < workers.size(); i++)
|
||||
workers[i].start(&Scheduler<EOT,Policy>::applyLinearPolicy, this, std::ref(func), std::ref(popPackages[i]));
|
||||
workers[i] = std::thread(&Scheduler<EOT,Policy>::applyLinearPolicy, this, std::ref(func), std::ref(popPackages[i]));
|
||||
|
||||
// Wait the end of tasks
|
||||
for(unsigned i = 0; i < workers.size(); i++)
|
||||
|
|
@ -90,7 +88,7 @@ void paradiseo::smp::Scheduler<EOT,Policy>::operator()(eoUF<EOT&, void>& func, e
|
|||
for(unsigned i = 0; i < workers.size(); i++)
|
||||
{
|
||||
planning[i] = 2;
|
||||
workers[i].start(&Scheduler<EOT,Policy>::applyProgressivePolicy, this, std::ref(func), std::ref(popPackages[i]), i);
|
||||
workers[i] = std::thread(&Scheduler<EOT,Policy>::applyProgressivePolicy, this, std::ref(func), std::ref(popPackages[i]), i);
|
||||
}
|
||||
|
||||
unsigned counter = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue