FACT++  1.0
void EventBuilderWrapper::StartThread ( const vector< tcp::endpoint > &  addr)
inline

Definition at line 373 of file EventBuilderWrapper.h.

References i, MessageImp::Message(), StartEvtBuild(), and MessageImp::Warn().

374  {
375  if (IsThreadRunning())
376  {
377  fMsg.Warn("Start - EventBuilder still running");
378  return;
379  }
380 
381  //fLastMessage.clear();
382 
383  for (size_t i=0; i<40; i++)
384  ConnectSlot(i, addr[i]);
385 
386  fMsg.Message("Starting EventBuilder thread");
387 
388  fThreadMain = boost::thread(StartEvtBuild);
389 
390  // Run a detached thread which ensures that our thread
391  // is joined so that it is not joinable anymore once
392  // it is finished (I think this is similar to
393  // boost::thread_guard, but I could not figure out
394  // how it works)
395  std::thread([this] { this->fThreadMain.join(); }).detach();
396  }
void ConnectSlot(unsigned int i, const tcp::endpoint &addr)
int i
Definition: db_dim_client.c:21
int Warn(const std::string &str)
Definition: MessageImp.h:48
int Message(const std::string &str)
Definition: MessageImp.h:46
void StartEvtBuild()

+ Here is the call graph for this function: