mirror of
https://github.com/nasa/trick.git
synced 2025-05-07 11:08:10 +00:00
closes #1133
This commit is contained in:
parent
1b978ef2da
commit
d75faecff8
@ -4,10 +4,12 @@
|
|||||||
int Trick::VariableServer::shutdown() {
|
int Trick::VariableServer::shutdown() {
|
||||||
listen_thread.cancel_thread() ;
|
listen_thread.cancel_thread() ;
|
||||||
std::map < pthread_t , VariableServerThread * >::iterator it ;
|
std::map < pthread_t , VariableServerThread * >::iterator it ;
|
||||||
|
pthread_mutex_lock(&map_mutex) ;
|
||||||
for ( it = var_server_threads.begin() ; it != var_server_threads.end() ; it++ ) {
|
for ( it = var_server_threads.begin() ; it != var_server_threads.end() ; it++ ) {
|
||||||
(*it).second->cancel_thread() ;
|
(*it).second->cancel_thread() ;
|
||||||
// cancelling causes each var_server_thread map element to be erased by the exit_var_thread function
|
// cancelling causes each var_server_thread map element to be erased by the exit_var_thread function
|
||||||
}
|
}
|
||||||
|
pthread_mutex_unlock(&map_mutex) ;
|
||||||
|
|
||||||
return 0 ;
|
return 0 ;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user