MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / unregister_all

Method unregister_all

dds/DCPS/WriteDataContainer.cpp:1319–1351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1317}
1318
1319void
1320WriteDataContainer::unregister_all()
1321{
1322 DBG_ENTRY_LVL("WriteDataContainer","unregister_all",6);
1323 shutdown_ = true;
1324
1325 //The internal list needs protection since this call may result from the
1326 //the delete_datawriter call which does not acquire the lock in advance.
1327 ACE_GUARD(ACE_Recursive_Thread_Mutex,
1328 guard,
1329 lock_);
1330 // Tell transport remove all control messages currently
1331 // transport is processing.
1332 (void) this->writer_->remove_all_msgs();
1333
1334 // Broadcast to wake up all waiting threads.
1335 if (waiting_on_release_) {
1336 condition_.notify_all();
1337 }
1338
1339 Message_Block_Ptr registered_sample;
1340
1341 for (PublicationInstanceMapType::iterator pos = instances_.begin(), limit = instances_.end(); pos != limit;) {
1342 // Release the instance data.
1343 if (remove_instance(pos->second, registered_sample, false) != DDS::RETCODE_OK) {
1344 ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: WriteDataContainer::unregister_all, "
1345 "remove_instance %X failed\n", pos->first));
1346 }
1347
1348 writer_->return_handle(pos->first);
1349 instances_.erase(pos++);
1350 }
1351}
1352
1353PublicationInstance_rch
1354WriteDataContainer::get_handle_instance(DDS::InstanceHandle_t handle)

Callers

nothing calls this directly

Calls 6

notify_allMethod · 0.80
remove_all_msgsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
return_handleMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected