mirror of https://github.com/sipwise/sems.git
Instead of blindly sleeping, use the `run_cond.wait_for()` for the case, when AmThread sends `.notify_all()` upon stopping. Hence we don't have to block the whole thread for 10 seconds if suddenly the `stop()` is requested by AmThread at the very beginning of the sleep. Add a dedicated `RegThread::wait_or_stop()` wrapper to handle this. Also differentiate whether the `RegThread::wait_or_stop()` returns due to timer exceed or there was an actual thread stop requested. Act accordingly during the `run()` execution. Change-Id: I1e603c462af983e633c811d10ed2d0ac506f46d3mr26.2
parent
f0193d91b7
commit
e9995a63f9
Loading…
Reference in new issue