[vlc-devel] commit: objects: Call vlc_object_join() automatically from vlc_object_destructor() if needed. (Pierre d'Herbemont )
Rafaël Carré
rafael.carre at gmail.com
Tue Mar 25 11:20:21 CET 2008
2008/3/25, Pierre d'Herbemont <pdherbemont at free.fr>:
>
> On Mar 25, 2008, at 11:02 AM, Pierre d'Herbemont wrote:
> >
> > On Mar 25, 2008, at 10:03 AM, Rafaël Carré wrote:
> >> 2008/3/23, git version control <git at videolan.org>:
> >>> vlc | branch: master | Pierre d'Herbemont
> >>> <pdherbemont at videolan.org> | Sun Mar 23 01:15:54 2008 +0100|
> >>> [05dc64af7e19036bbf6fa538345b5a2278a1d91f]
> >>>
> >>> objects: Call vlc_object_join() automatically from
> >>> vlc_object_destructor() if needed.
> >>> interaction: No need to call vlc_object_join() now.
> >>>
> >>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=05dc64af7e19036bbf6fa538345b5a2278a1d91f
> >>
> >>> @@ -419,6 +420,10 @@ static void vlc_object_destroy( vlc_object_t
> >>> *p_this )
> >>> /* Send a kill to the object's thread if applicable */
> >>> vlc_object_kill( p_this );
> >>>
> >>> + /* If we are running on a thread, wait until it ends */
> >>> + if( p_priv->b_thread )
> >>> + vlc_thread_join( p_this );
> >>> +
> >>
> >> If a thread calls vlc_object_release() to destroy itself, there is an
> >> obvious deadlock, and vlc_thread_join() fails loudly.
> >
>
> > pthread_join() should not dead lock and returns EDEADLK. On Windows, I
> > don't know.
>
>
> Oops. That's what you've said.
>
> The error message should be suppressed, or I'll implement a special
> vlc_thread_join() for that. Still wondering which one to choose.
The less ugly ? :)
--
Rafaël Carré
More information about the vlc-devel
mailing list