mirror of
https://github.com/nasa/trick.git
synced 2024-12-23 15:02:25 +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 ;
|
|
}
|
|
|