MT#65612 RegThread: tighten the check registrations loop

make the `run()` more accurately honor the threads stop
request when checking registrations in the inner-loop.

If the thread is on `wait_or_stop()` this should be managed
just quickly and gracefully.

However if we are on the `check_registration()` or
`create_registration()` doing a DI cal, threads stop request
cannot really interrupt it. So tighten it.

Change-Id: I31ef44445817d4eb8e11cf269c2bd4db2eff71ef
mr26.2
Donat Zenichev 2 weeks ago
parent cf3fc87bc2
commit 65ac23e039

@ -206,7 +206,7 @@ void RegThread::run() {
while (!stop_requested())
{
for (vector<RegInfo>::iterator it = registrations.begin();
it != registrations.end();
it != registrations.end() && !stop_requested();
it++)
{
if (!check_registration(*it)) {

@ -77,7 +77,9 @@ class RegistrationAgentFactory: public AmSessionFactory
/* makes the thread stop as soon as the app factory begins its destruction */
DBG("Requested the reg agent thread to stop.\n");
dialer.stop();
INFO("Joining reg_agent thread...\n");
dialer.join();
INFO("reg_agent thread joined.\n");
}
int onLoad();

Loading…
Cancel
Save