diff --git a/src/groups/mqb/mqba/mqba_domainmanager.cpp b/src/groups/mqb/mqba/mqba_domainmanager.cpp index f44026aab2..f59930cbb7 100644 --- a/src/groups/mqb/mqba/mqba_domainmanager.cpp +++ b/src/groups/mqb/mqba/mqba_domainmanager.cpp @@ -719,6 +719,8 @@ void DomainManager::createDomain( const bsl::string& name, const mqbi::DomainFactory::CreateDomainCb& callback) { + // executed by *ANY* thread + if (!d_isStarted) { BALL_LOG_INFO << "Not creating domain [" << name << "] at this time " << "because self is stopping."; diff --git a/src/groups/mqb/mqba/mqba_domainmanager.h b/src/groups/mqb/mqba/mqba_domainmanager.h index d1038eed93..db731253b5 100644 --- a/src/groups/mqb/mqba/mqba_domainmanager.h +++ b/src/groups/mqb/mqba/mqba_domainmanager.h @@ -33,7 +33,6 @@ // This component is thread safe. // MQB - #include #include @@ -65,9 +64,6 @@ namespace BloombergLP { namespace bslmt { class Latch; } -namespace bsls { -class AtomicInt; -} namespace mqbblp { class ClusterCatalog; } @@ -189,7 +185,7 @@ class DomainManager BSLS_CPP11_FINAL : public mqbi::DomainFactory { DomainSpMap d_domains; // Map of domains - bool d_isStarted; + bsls::AtomicBool d_isStarted; // Is the domain manager started bslma::Allocator* d_allocator_p;