[vlc-devel] commit: objects: Call vlc_object_join()automatically from vlc_object_destructor() if needed. (Pierred'Herbemont )

Rémi Denis-Courmont rdenis at simphalempin.com
Tue Mar 25 21:16:42 CET 2008

Le Tuesday 25 March 2008 21:46:56 Pierre d'Herbemont, vous avez écrit :
> On Mar 25, 2008, at 6:50 PM, Rémi Denis-Courmont wrote:
> > For any given thread, you have to make sure either of these happens,
> > predictably. If you want vlc_object_destroy() to be callable both
> > from inside
> > the thread and from outside
> After more thought, I am not sure it's a good idea/concept to let the
> vlc_object_t be released from the its own thread. That seems a bit
> crippled and whereas it could work it's a bit dangerous.

My religion has nothing to say about this. I don't really care.

However, a mechanism needs to ensure that an object is NOT destroyed until its 
thread is joining, otherwise a crash is sure to happen when the thread wakes 
up... Yes, "killing" the object and then joining the thread when the refcount 
reaches zero ought to be sufficient.

Rémi Denis-Courmont

More information about the vlc-devel mailing list