Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
a417ec82
Commit
a417ec82
authored
Jun 30, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warn in case of dangerous thread join patterns
parent
17e4415c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
src/misc/objects.c
src/misc/objects.c
+5
-0
src/misc/threads.c
src/misc/threads.c
+3
-0
No files found.
src/misc/objects.c
View file @
a417ec82
...
...
@@ -301,7 +301,12 @@ static void vlc_object_destroy( vlc_object_t *p_this )
/* If we are running on a thread, wait until it ends */
if
(
p_priv
->
b_thread
)
{
msg_Warn
(
p_this
->
p_libvlc
,
/* do NOT use a dead object for logging! */
"object %d destroyed while thread alive (VLC might crash)"
,
p_this
->
i_object_id
);
vlc_thread_join
(
p_this
);
}
/* Call the custom "subclass" destructor */
if
(
p_priv
->
pf_destructor
)
...
...
src/misc/threads.c
View file @
a417ec82
...
...
@@ -695,7 +695,10 @@ void __vlc_thread_join( vlc_object_t *p_this, const char * psz_file, int i_line
/* Make sure we do return if we are calling vlc_thread_join()
* from the joined thread */
if
(
pthread_equal
(
pthread_self
(),
p_priv
->
thread_id
))
{
msg_Warn
(
p_this
,
"joining the active thread (VLC might crash)"
);
i_ret
=
pthread_detach
(
p_priv
->
thread_id
);
}
else
i_ret
=
pthread_join
(
p_priv
->
thread_id
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment