Commit ee64cc8d authored by yannick legoc's avatar yannick legoc
Browse files

Added test for subscriber in tas::RemoteMatlabPub

parent fe13ab42
......@@ -54,19 +54,23 @@ RemoteMatlabPub::RemoteMatlabPub(const RemoteMatlabPub& controller) :
RemoteMatlabPub::~RemoteMatlabPub() {
// Stop the subscriber
m_subscriber->cancel();
// Test the subscriber
if (m_subscriber.get() != 0) {
// The subscriber thread terminates
m_subscriberThread->join();
// Stop the subscriber
m_subscriber->cancel();
// Notify the application
m_publisher->sendEnd();
// The subscriber thread terminates
m_subscriberThread->join();
// Wait for the termination
application::State state = m_matlabApplication->waitFor();
// Notify the application
m_publisher->sendEnd();
cout << "Matlab application terminated with state " << application::toString(state) << endl;
// Wait for the termination
application::State state = m_matlabApplication->waitFor();
cout << "Matlab application terminated with state " << application::toString(state) << endl;
}
}
void RemoteMatlabPub::postConfiguration() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment