| 1317 | } |
| 1318 | |
| 1319 | void |
| 1320 | WriteDataContainer::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 | |
| 1353 | PublicationInstance_rch |
| 1354 | WriteDataContainer::get_handle_instance(DDS::InstanceHandle_t handle) |
nothing calls this directly
no test coverage detected