Introducing - the check if a thread queue might have data. Without locks. Who needs those anyways.

This commit is contained in:
Bernhard Amann 2012-03-26 19:53:01 -07:00
parent 355b85fcd7
commit 3405cbdfbd
3 changed files with 17 additions and 0 deletions

View file

@ -82,6 +82,12 @@ double Manager::NextTimestamp(double* network_time)
// If we had something to process last time (or out heartbeat
// is due), we want to check for more asap.
return timer_mgr->Time();
for ( msg_thread_list::iterator i = msg_threads.begin(); i != msg_threads.end(); i++ )
{
if ( (*i)->MightHaveOut() )
return timer_mgr->Time();
}
return -1.0;
}