fix heart_beat_interval -- initialization in constructor does not work anymore (probably due to change in init ordering?)

This commit is contained in:
Bernhard Amann 2012-04-01 17:13:51 -07:00
parent fd70560017
commit 384fc730d4

View file

@ -60,6 +60,12 @@ void Manager::KillThreads()
void Manager::AddThread(BasicThread* thread)
{
if ( heart_beat_interval == 0 ) {
// sometimes initialization does not seem to work from constructor
heart_beat_interval = double(BifConst::Threading::heart_beat_interval);
DBG_LOG(DBG_THREADING, "Heart beat interval set to %f", heart_beat_interval);
}
DBG_LOG(DBG_THREADING, "Adding thread %s ...", thread->Name().c_str());
all_threads.push_back(thread);
idle = false;