Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: vdr 1.3.18 cCondWait::SleepMs (was: vdr 1.3.18 withsubtitles and ttxtsubs plugin)
Hello
Wouldn't it be use full if (some kind of) cCondWait::SleepMs returns
the result of cCondWait::Wait so the calling thread might be
able to do some houskeeping in the case of an termination signal
and does not continue to call the SleepMs?
Especially as "signaled" is reset which every call to SleepMs
and termination of Wait.
Else i don't see what's the sense of "signaled".
Isn't redundant if it is cleared outside the "constructor"?
AFAIK pthread_cond_timedwait unlocks the mutex.
Only on timeout it becomes relocked, not on "condition".
Why is it unlocked a second time at the end of the function
regardless of the state of "signaled" ?
BTW:
http://www2.yo-linux.com/cgi-bin/man.cgi?section=all&topic=pthread_cond_timedwait
ASYNC-SIGNAL SAFETY
The condition functions are not async-signal safe,
and should not be called from a signal handler.
In particular, calling
pthread_cond_signal or
pthread_cond_broadcast
from a signal handler may deadlock the calling thread.
Where is cCondWait::Signal called from?
Rainer
Home |
Main Index |
Thread Index