コード例 #1
0
 void ReplicationCoordinatorExternalStateImpl::shutdown() {
     _syncSourceFeedback.shutdown();
     BackgroundSync* bgsync = BackgroundSync::get();
     bgsync->shutdown();
     _syncSourceFeedbackThread->join();
     _backgroundSyncThread->join();
     _producerThread->join();
 }
コード例 #2
0
 void ReplicationCoordinatorExternalStateImpl::shutdown() {
     boost::lock_guard<boost::mutex> lk(_threadMutex);
     if (_startedThreads) {
         log() << "Stopping replication applier threads";
         _syncSourceFeedback.shutdown();
         _syncSourceFeedbackThread->join();
         _applierThread->join();
         BackgroundSync* bgsync = BackgroundSync::get();
         bgsync->shutdown();
         _producerThread->join();
     }
 }
コード例 #3
0
void ReplicationCoordinatorExternalStateImpl::shutdown() {
    stdx::lock_guard<stdx::mutex> lk(_threadMutex);
    if (_startedThreads) {
        log() << "Stopping replication applier threads";
        if (_syncSourceFeedbackThread) {
            _syncSourceFeedback.shutdown();
            _syncSourceFeedbackThread->join();
        }
        if (_applierThread) {
            _applierThread->join();
        }

        if (_producerThread) {
            BackgroundSync* bgsync = BackgroundSync::get();
            if (bgsync) {
                bgsync->shutdown();
            }
            _producerThread->join();
        }
        if (_snapshotThread)
            _snapshotThread->shutdown();
    }
}