Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
16fe80d8
Commit
16fe80d8
authored
5 years ago
by
George Joseph
Committed by
Gerrit Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "res_config_sqlite3: Only join threads that we started" into 13
parents
8e09fbb4
202fdc88
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
res/res_config_sqlite3.c
+4
-2
4 additions, 2 deletions
res/res_config_sqlite3.c
with
4 additions
and
2 deletions
res/res_config_sqlite3.c
+
4
−
2
View file @
16fe80d8
...
...
@@ -104,6 +104,7 @@ struct realtime_sqlite3_db {
unsigned
int
debug
:
1
;
unsigned
int
exiting
:
1
;
unsigned
int
wakeup
:
1
;
unsigned
int
has_batch_thread
:
1
;
unsigned
int
batch
;
};
...
...
@@ -368,13 +369,14 @@ void db_start_batch(struct realtime_sqlite3_db *db)
if
(
db
->
batch
)
{
ast_cond_init
(
&
db
->
cond
,
NULL
);
ao2_ref
(
db
,
+
1
);
ast_pthread_create_background
(
&
db
->
syncthread
,
NULL
,
db_sync_thread
,
db
);
db
->
has_batch_thread
=
!
ast_pthread_create_background
(
&
db
->
syncthread
,
NULL
,
db_sync_thread
,
db
);
}
}
void
db_stop_batch
(
struct
realtime_sqlite3_db
*
db
)
{
if
(
db
->
batch
)
{
if
(
db
->
has_batch_thread
)
{
db
->
has_batch_thread
=
0
;
db
->
exiting
=
1
;
db_sync
(
db
);
pthread_join
(
db
->
syncthread
,
NULL
);
...
...
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