29 using namespace YACS::BASES;
31 AlternateThreadPT::AlternateThreadPT()
32 : _threadStatus(UNEXISTING)
44 }
catch (
const exception & e) {
45 cerr <<
"Exception happened in AlternateThreadPT destructor: " << e.what() << endl;
47 cerr <<
"Unknown exception happened in AlternateThreadPT destructor." << endl;
77 DEBTRACE(
"Master is trying to terminate slave by signaling error")
83 cerr <<
"Warning: Slave thread in AlternateThread did not end properly. "
84 "Thread will be canceled." << endl;
103 DEBTRACE(
"AlternateThread terminated")
109 DEBTRACE(
"Master signaling slave and waiting");
117 DEBTRACE(
"Slave signaling master and waiting");
144 DEBTRACE(
"Slave thread is now running")
148 pthread_cleanup_pop(1);
149 }
catch (
const exception & e) {
150 cerr <<
"Unrecoverable error: an exception was caught in AlternateThread "
151 "(exceptions should normally be caught before getting here). "
152 "Exception type is: " <<
typeid(e).name() <<
", message is: " <<
169 DEBTRACE(
"Cleaning up slave thread")