MCPcopy Create free account
hub / github.com/apache/brpc / GetThreadLocal

Class GetThreadLocal

test/thread_local_unittest.cc:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48};
49
50class GetThreadLocal : public ThreadLocalTesterBase {
51 public:
52 GetThreadLocal(TLPType* tlp, butil::WaitableEvent* done)
53 : ThreadLocalTesterBase(tlp, done),
54 ptr_(NULL) {
55 }
56 virtual ~GetThreadLocal() {}
57
58 void set_ptr(ThreadLocalTesterBase** ptr) { ptr_ = ptr; }
59
60 virtual void Run() OVERRIDE {
61 DCHECK(!done_->IsSignaled());
62 *ptr_ = tlp_->Get();
63 done_->Signal();
64 }
65
66 private:
67 ThreadLocalTesterBase** ptr_;
68};
69
70} // namespace
71

Callers

nothing calls this directly

Calls 3

IsSignaledMethod · 0.80
GetMethod · 0.45
SignalMethod · 0.45

Tested by

no test coverage detected