detect worker-thread-exit/fail?

RK
Roland Koebler
Wed, Dec 14, 2016 10:00 PM

Hi,

is there a way in Python/pjsua, to detect if the worker thread is
still running?

If the worker thread calls a callback, and the callback raises an
exception, the worker thread exits, and the main program does not
get the exception -- it even doesn't notice that something has gone
wrong. The only way I know to check if the worker-thread is still
running, is to test if account.info().reg_expires is < 0, but there
has to be a better way...

thanks,
Roland

Hi, is there a way in Python/pjsua, to detect if the worker thread is still running? If the worker thread calls a callback, and the callback raises an exception, the worker thread exits, and the main program does not get the exception -- it even doesn't notice that something has gone wrong. The only way I know to check if the worker-thread is still running, is to test if account.info().reg_expires is < 0, but there has to be a better way... thanks, Roland