コード例 #1
0
ファイル: test_i.cpp プロジェクト: chenbk85/ACE-Middleware
int
Simple_Server_i::handle_timeout (const ACE_Time_Value &,
                                 const void *)
{
  ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);
  // We are the (client) leader.  Signal the leader-follower pattern to
  // elect a new leader
  TAO_ORB_Core *oc = orb_->orb_core();
  oc->lf_strategy ().set_upcall_thread (oc->leader_follower ());
  // Block until another thread is elected leader and handles a *new* event.
  ACE_DEBUG ((LM_DEBUG, "(%P|%t) handle_timeout () called - waiting...\n"));
  this->cond_.wait();
  return 0;
}