Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
blc_program
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blaar
blibs
blc_program
Commits
edf8657d
Commit
edf8657d
authored
5 years ago
by
Arnaud Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
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
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/blc_command.h
+5
-0
5 additions, 0 deletions
include/blc_command.h
src/blc_loop.cpp
+5
-1
5 additions, 1 deletion
src/blc_loop.cpp
with
10 additions
and
1 deletion
include/blc_command.h
+
5
−
0
View file @
edf8657d
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/blc_loop.cpp
+
5
−
1
View file @
edf8657d
...
...
@@ -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
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment