On 24 Mar 2006 Peter Juszack vdr@unterbrecher.de wrote:
Do I have to lock/unlock the cDevice when switching to a channel?
I don't know this specific plugin, but looking at the code sniplet:
void cEggtimerThread::Stop(void) { #ifdef DEBUG printf("cEggtimerThread::Stop\n" ); #endif running = false; Cancel(30); }
void cEggtimerThread::Action(void) {
[...]
Stop(); // Stop eggtimer thread
I don't think that one should Cancel() (in this case via Stop()) a thread from inside the Action() function. This must lead to the observed dead-lock.
I guess you should set running=false and let the loop terminate itself (if needed you can break; out from the loop too). On exit from Action() the child thread is terminated.
Regards.