MCPcopy Create free account
hub / github.com/Tencent/phxqueue / Dispose

Method Dispose

phxqueue/scheduler/schedulermgr.cpp:83–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83comm::RetCode SchedulerMgr::Dispose() {
84 comm::SchedulerMgrBP::GetThreadInstance()->OnDispose();
85
86 {
87 comm::utils::RWLock rwlock_write(impl_->rwlock, comm::utils::RWLock::LockMode::WRITE);
88 impl_->topic_id2data_map.clear();
89 //if (conhash_) {
90 // delete conhash_;
91 // conhash_ = nullptr;
92 //}
93 //if (hrwhash_) {
94 // delete hrwhash_;
95 // hrwhash_ = nullptr;
96 //}
97 }
98
99 if (nullptr != impl_->rwlock) {
100 QLVerb("destroy rwlock");
101 pthread_rwlock_destroy(impl_->rwlock);
102 delete impl_->rwlock;
103 impl_->rwlock = nullptr;
104 }
105
106 return comm::RetCode::RET_OK;
107}
108
109comm::RetCode SchedulerMgr::GetAddrScale(const comm::proto::GetAddrScaleRequest &req,
110 comm::proto::GetAddrScaleResponse &resp) {

Callers

nothing calls this directly

Calls 1

OnDisposeMethod · 0.45

Tested by

no test coverage detected