Hi,

On Dec 6, 2011 6:06 PM, "Uoti Urpala" <[email protected]> wrote:
>
> On Tue, 2011-12-06 at 22:18 +0700, Sergey Radionov wrote:
> > Reason for making this patch
> > is https://trac.videolan.org/vlc/ticket/5571
> >
> >
> > Problem is that under windows, when multiple threads waiting on same
> > semaphore, and when ReleaseSemaphore called, it impossible to predict
> > wich thread will wake up...
>
> The pthread_cond_broadcast() implementation in w32pthreads.h looks
> suspicious - it could wake up the same thread multiple times (if it
> re-enters wait fast enough) instead of waking up all current waiters.
> Maybe that is the actual problem?

If that's the case grabbing and directly releasing a static lock in
pthread_mutex_lock, and holding this in pthread_cond_broadcast, should fix
it.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to