[vlc-devel] vlc_object_signal removal

Pierre d'Herbemont pdherbemont at free.fr
Sun Sep 7 23:40:48 CEST 2008


On Sep 7, 2008, at 11:15 PM, Derk-Jan Hartman wrote:

> On 7 sep 2008, at 23:12, Pierre d'Herbemont wrote:
>> On Sun, Sep 7, 2008 at 8:22 PM, Rémi Denis-Courmont
>> <rem at videolan.org> wrote:
>>> Then there is some obscure MacOS X hack whose logic has
>>> resisted my attempts to make any sense out of it.
>>
>> What hack exactly?
>
> I think he's talking about intf_RunThread's MonitorLibVLCDeath

Yeah, this one is nasty. We need to make sure that a  
vlc_object_kill( libvlc ) exits our interface thread, even if it is  
blocking main thread.

The interface module that is blocking main thread, will spawn a thread  
that will monitor the intf death.

We need to tell that thread that the intf is dead when libvlc is. That  
is what does MonitorLibVLCDeath.

The vlc_object_signal() is used so that we don't kill libvlc if the  
interface didn't do it. Yet we need to kill MonitorLibVLCDeath(), and  
MonitorLibVLCDeath is wait()-ing for a signal(libvlc), but will exit  
if p_intf is dead.

Yet, this is over engineered, as we always kill libvlc when our main  
thread intf is killed (in osx case). So we could remove that signal().

Pierre.


More information about the vlc-devel mailing list