[vlc-devel] [PATCH 1/2] thread: winstore: Do not discard a signaled object.
remi at remlab.net
Fri Nov 21 16:32:29 CET 2014
Le 2014-11-21 12:50, Hugo Beauzée-Luyssen a écrit :
> If the thread isn't cancellable, it would loop again until the
> is actually signaled, however that seems like an expected behavior to
That is desirable but not required. The only strict requirement is to
return zero from vlc_cond_timedwait() if the deadline is not reached.
> The problem here is that we override the wait condition signaling.
> Actually the issue could be that we are enforcing looping on spurious
> wakeups, while this might be more of a caller's responsibility, just
> like it's done using pthread.
> I'm not sure sure I understand what you mean by the msleep part?
Consider these cases for a cancelled but not cancellable thread:
-> should return when the timeout is reached.
2) vlc_cond_timedwait() if the variable is *not* signaled
-> should return ETIMEDOUT when the timeout is reached.
3) vlc_cond_timedwait() if the variable *is* signaled
-> should return 0.
-> should return (assuming the variable is signaled).
I believe your patch addresses the last two cases, but leaves the first
More information about the vlc-devel