DEBTRACE("before _semForMaxThreads.wait " << _semThreadCnt);
if(_semThreadCnt == 0)
{
+ // --- Critical section
+ YACS::BASES::AutoLocker<YACS::BASES::Mutex> alck(&_mutexForSchedulerUpdate);
//check if we have enough threads to run
std::set<Task*> tmpSet=_runningTasks;
std::set<Task*>::iterator it = tmpSet.begin();
std::cerr << "WARNING: maybe you need more threads to run your schema (current value="<< _maxThreads << ")" << std::endl;
std::cerr << "If it is the case, set the YACS_MAX_THREADS environment variable to a bigger value (export YACS_MAX_THREADS=xxx)" << std::endl;
}
+ // --- End of critical section
}
_semForMaxThreads.wait();