Variable server restart issues

Added mutexes in the variable server listener thread and each variable server thread.
During checkpoint restart all of these mutexes are locked by the master thread to
stop accepting new connections and stop all read/writing to all variable server clients.
Communication is resumed after the checkpoint has been reloaded.

refs #168
This commit is contained in:
Alex Lin
2016-04-19 13:50:30 -05:00
parent fad36fc544
commit 8c3e322ed1
7 changed files with 47 additions and 5 deletions

View File

@ -48,6 +48,7 @@ Trick::VariableServerThread::VariableServerThread(TCDevice * in_listen_dev) :
connection.error_handler->report_level = TRICK_ERROR_CAUTION;
pthread_mutex_init(&copy_mutex, NULL);
pthread_mutex_init(&restart_pause, NULL);
var_data_staged = false;
packets_copied = 0 ;