mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
parent
51ddcfaae0
commit
ca35092c1d
@ -276,9 +276,9 @@ int Trick::DataRecordDispatcher::dmtcp_restart() {
|
||||
int Trick::DataRecordDispatcher::shutdown() {
|
||||
|
||||
if ( drd_writer_thread.get_pthread_id() != 0 ) {
|
||||
// TODO: we could lock up here on the trylock.
|
||||
while (pthread_mutex_trylock(&drd_mutexes.dr_go_mutex));
|
||||
pthread_cancel(drd_writer_thread.get_pthread_id()) ;
|
||||
pthread_mutex_lock( &drd_mutexes.dr_go_mutex);
|
||||
pthread_cancel( drd_writer_thread.get_pthread_id()) ;
|
||||
pthread_mutex_unlock( &drd_mutexes.dr_go_mutex);
|
||||
}
|
||||
|
||||
return(0) ;
|
||||
|
Loading…
Reference in New Issue
Block a user