Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.01 KB | None | 0 0
  1. void orchestrator::__orchestrator_working_thread() {
  2.     while (__orchestrator_running) {
  3.         if (__save_readers) {
  4.             //boost::unique_lock<boost::mutex> scoped_lock(__access_mutex);
  5.             for (boost::unordered_map<std::string, boost::shared_ptr<idnova::base_reader> >::iterator it = __readers_map.begin(); it != __readers_map.end();
  6.                     it++) {
  7.                 if (it->second->refresh_configuration_unsafe()) {
  8.                     if (it->second->is_updated()) {// || next_save_timestamp < boost::posix_time::microsec_clock::local_time()) {
  9.                         if (odbi->save_reader(it->second)){
  10.                             it->second->set_updated(false);
  11.                         }
  12.                     }
  13.                     std::vector<tag_search_query> tags = it->second->fetch_and_clean_tag_list();
  14.                     for (boost::shared_ptr<orchestrator_base_module> obm : __orchestrator_modules) {
  15.                         obm->tags_list_callback(tags);
  16.                     }
  17.                     odbi->save_tags(tags);
  18.                 }
  19.             }
  20.         }
  21.         sleep(1); // make it larger!
  22.     }
  23.     //std::cout << std::endl << "####################ORCHESTRATOR WORKING THREAD ENDED####################" << std::endl;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement