MCPcopy Create free account
hub / github.com/apache/impala / ThreadDescriptor

Class ThreadDescriptor

be/src/kudu/util/thread.cc:215–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 // TODO: Add start-time.
214 // TODO: Track fragment ID.
215 class ThreadDescriptor {
216 public:
217 ThreadDescriptor() { }
218 ThreadDescriptor(string category, string name, int64_t thread_id)
219 : name_(std::move(name)),
220 category_(std::move(category)),
221 thread_id_(thread_id) {}
222
223 const string& name() const { return name_; }
224 const string& category() const { return category_; }
225 int64_t thread_id() const { return thread_id_; }
226
227 struct Comparator {
228 bool operator()(const ThreadDescriptor& rhs, const ThreadDescriptor& lhs) const {
229 return rhs.name() < lhs.name();
230 }
231 };
232
233 private:
234 string name_;
235 string category_;
236 int64_t thread_id_;
237 };
238
239 struct ThreadIdHash {
240 size_t operator()(pthread_t thread_id) const noexcept {

Callers 1

AddThreadMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected