[MPlayer-dev-eng] threaded cache
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Nov 27 17:41:17 CET 2011
On Sun, Nov 27, 2011 at 06:32:03PM +0200, Andrej N. Gritsenko wrote:
> Hello!
>
> >I also admit that MPlayer currently won't behave fully correctly with
> >system clock changes anyway, however I think it at least will not hang
> >completely (which maybe it would when pthread_cond_timedwait does not
> >work correctly here - not sure, the main thread might just end up waking
> >it up as soon as the user attempts a seek operation or something, not
> >sure it always will).
>
> I have my application (which I mentioned earlier) running on the
> system where time clock is very unstable (and it's not Linux BTW but
> OpenIndiana variation of Solaris OS) and I have no problems with waking
> up from the pthread_cond_timedwait in all cases (positive and negative
> drifts) so don't worry, it always will. :)
If you look at the glibc pthread implementation you see it won't.
If you set the clock from 2100 to 2011 somewhen in-between the point
where you calculate the timeout and when you call pthread_cond_timedwait
it will wake up in 2100.
Yes, you are right it will wake up _somewhen_. However 2100 might be a bit
late for most of our users.
More information about the MPlayer-dev-eng
mailing list