Database/server.c
void client_control_stop() {
    // TODO: Ensure that the next time client threads call client_control_wait()
    // at the top of the event loop in run_client, they will block.
	pthread_mutex_lock (&(cct.go_mutex));
	cct.stopped = 1;
	pthread_cond_signal (&(cct.go));
	pthread_mutex_unlock (&(cct.go_mutex));
}
// Called by main thread to stop client threads
Called by main thread to stop client threads
Called by main thread to stop client threads
void client_control_stop() {
	pthread_mutex_lock (&(cct.go_mutex));
	cct.stopped = 1;
	pthread_cond_signal (&(cct.go));
	pthread_mutex_unlock (&(cct.go_mutex));
}
void client_control_stop ( ) { pthread_mutex_lock ( & ( cct . go_mutex ) ) ; cct . stopped = 1 ; pthread_cond_signal ( & ( cct . go ) ) ; pthread_mutex_unlock ( & ( cct . go_mutex ) ) ; }
Called by main thread to stop client threads
Called by main thread to stop client threads
// TODO: Ensure that the next time client threads call client_control_wait() // at the top of the event loop in run_client, they will block.