MCPcopy Create free account
hub / github.com/bytedance/bolt / close

Method close

bolt/exec/ExchangeClient.cpp:85–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void ExchangeClient::close() {
86 std::vector<std::shared_ptr<ExchangeSource>> sources;
87 {
88 std::lock_guard<std::mutex> l(queue_->mutex());
89 if (closed_) {
90 return;
91 }
92 closed_ = true;
93 sources = std::move(sources_);
94 }
95
96 // Outside of mutex.
97 for (auto& source : sources) {
98 source->close();
99 }
100 queue_->close();
101}
102
103folly::F14FastMap<std::string, RuntimeMetric> ExchangeClient::stats() const {
104 std::lock_guard<std::mutex> l(queue_->mutex());

Callers 1

addRemoteTaskIdMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected