[vlc-devel] [PATCH] win32/thread: avoid waking up every 50ms to see if the thread is canceled

Steve Lhomme robux4 at videolabs.io
Mon Jul 20 15:57:10 CEST 2015


On Mon, Jul 20, 2015 at 3:53 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2015-07-20 16:44, Steve Lhomme a écrit :
>>>
>>> What if count is not one?
>>> What is "handle != NULL" for?
>>
>>
>> `ret` is initialized to WAIT_FAILED so at the end of the `else` it
>> will consider there's an invalid call and crash.
>
>
>>> What if poll() is used?
>>
>>
>> I don't know what poll does.
>>
>>> More importantly, this fix is likely in vain given that
>>> vlc_cond_broadcast()
>>> is broken on Windows (not only WinRT).
>>
>>
>> Well, it works better than the old patch we had in place which was
>> deadlocking.
>
>
> So you say. Looks much worse to me.

This is what I'm talking about that was deadlocking.

http://git.videolan.org/?p=vlc/vlc-msvc.git;a=blob;f=patches/0062-threads-Ugly-hack-to-avoid-waking-up-our-wait-condit.patch;h=f90902791e73bde5bce0fd10d58d42706e1a9a2c;hb=HEAD

We still want to about this 50 ms polling.

> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list