Skip to content
Snippets Groups Projects
Commit edf8657d authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Add a function 'void blc_loop_wait_stop();

' used to wait for the main thread of the blc_loop to stop. (used by coreaudio)
parent 27e1067e
No related merge requests found
......@@ -126,6 +126,11 @@ void blc_command_loop_init(long loop_period);
int blc_command_loop_start();
void blc_command_loop_end();
/** Wait that the loop_thread launched by 'blc_command_loop_init' listining on keyboard stops ( i.e. 'quitting has been requested ).*/
void blc_loop_wait_stop();
/** Stop a textual program
* - Send a quitting message with the name of the app on stderr.
* - Send 'q' and flush on stdout if it is a piped output
......
......@@ -36,7 +36,6 @@ static struct timeval step_timer, profile_timer;
static sem_t *blocking_semaphore=NULL;
type_blc_status blc_status=BLC_RUN;
void blc_fprint_stats(FILE *file){
......@@ -291,3 +290,8 @@ void blc_command_loop_end(){
intermediate_iteration++;
blc_loop_iteration++;
}
void blc_loop_wait_stop(){
pthread_join(loop_thread, nullptr);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment