dispatch_queue.cond.Wait(dispatch_queue.lock); //wait for something to be put on queue
}
dispatch_queue.lock.Unlock();
- dout(15) << "dispatch: ending loop " << dendl;
-
- put(); //this thread is shutting down, so one less reference
+
+ //tell everything else it's time to stop
+ lock.Lock();
+ endpoint_stopped = true;
+ wait_cond.Signal();
+ lock.Unlock();
}
void SimpleMessenger::ready()
return true;
}
-
-void SimpleMessenger::unregister_entity(entity_name_t name)
-{
- lock.Lock();
- dout(10) << "unregister_entity " << get_myname() << dendl;
-
- // remove from local directory.
- assert(get_myname() == name);
- endpoint_stopped = true;
-
- wait_cond.Signal();
-
- lock.Unlock();
-}
-
-
void SimpleMessenger::submit_message(Message *m, const entity_inst_t& dest, bool lazy)
{
const entity_addr_t& dest_addr = dest.addr;
bool& isvalid);
bool register_entity(entity_name_t addr);
- void unregister_entity(entity_name_t addr);
void submit_message(Message *m, const entity_inst_t& addr, bool lazy=false);
int send_keepalive(entity_inst_t addr);