mirror of
https://github.com/nasa/trick.git
synced 2024-12-22 06:27:49 +00:00
22 lines
475 B
C++
22 lines
475 B
C++
|
|
#include "trick/VariableServer.hh"
|
|
|
|
int Trick::VariableServer::shutdown() {
|
|
|
|
// Shutdown all listen threads
|
|
listen_thread.cancel_thread() ;
|
|
for (auto& listen_it : additional_listen_threads) {
|
|
listen_it.second->cancel_thread();
|
|
}
|
|
|
|
// Shutdown all session threads
|
|
pthread_mutex_lock(&map_mutex) ;
|
|
for (auto& it : var_server_threads) {
|
|
it.second->cancel_thread() ;
|
|
}
|
|
pthread_mutex_unlock(&map_mutex) ;
|
|
|
|
return 0 ;
|
|
}
|
|
|