comparison Core/JobsEngine/JobsRegistry.cpp @ 2620:1232922c8793 jobs

speeding up shutdown if Lua script is in trailing phase
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 May 2018 14:08:57 +0200
parents 140a539b4eba
children 00327e989458
comparison
equal deleted inserted replaced
2619:4ecb79c6e81c 2620:1232922c8793
444 delete it->second; 444 delete it->second;
445 } 445 }
446 } 446 }
447 447
448 448
449 void JobsRegistry::SetMaxCompletedJobs(size_t i) 449 void JobsRegistry::SetMaxCompletedJobs(size_t n)
450 { 450 {
451 boost::mutex::scoped_lock lock(mutex_); 451 boost::mutex::scoped_lock lock(mutex_);
452 CheckInvariants(); 452 CheckInvariants();
453 453
454 maxCompletedJobs_ = i; 454 LOG(INFO) << "The size of the history of the jobs engine is set to: " << n << " job(s)";
455
456 maxCompletedJobs_ = n;
455 ForgetOldCompletedJobs(); 457 ForgetOldCompletedJobs();
456 458
457 CheckInvariants(); 459 CheckInvariants();
458 } 460 }
459 461