int status = pthread_join(thread_id, prval);
if (status == 0)
thread_id = 0;
- else
+ else {
cout << "join status = " << status << endl;
+ assert(0);
+ }
return status;
}
};
rank.unregister_entity(this);
// stop my dispatch thread
- if (dispatch_thread.am_self())
+ if (dispatch_thread.am_self()) {
+ dout(0) << "shutdown i am dispatch, setting stop flag" << endl;
stop = true;
- else {
+ } else {
+ dout(0) << "shutdown i am not dispatch, setting stop flag and joining thread." << endl;
lock.Lock();
stop = true;
cond.Signal();