[vlc-devel] commit: objects: Call vlc_object_join() automatically from vlc_object_destructor() if needed. (Pierre d'Herbemont )
Rafaël Carré
funman at videolan.org
Tue Mar 25 10:03:31 CET 2008
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.
--
Rafaël Carré
More information about the vlc-devel
mailing list