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

Class CallDoStuffOnThread

test/thread_checker_unittest.cc:48–63  ·  view source on GitHub ↗

Calls ThreadCheckerClass::DoStuff on another thread.

Source from the content-addressed store, hash-verified

46
47// Calls ThreadCheckerClass::DoStuff on another thread.
48class CallDoStuffOnThread : public butil::SimpleThread {
49 public:
50 explicit CallDoStuffOnThread(ThreadCheckerClass* thread_checker_class)
51 : SimpleThread("call_do_stuff_on_thread"),
52 thread_checker_class_(thread_checker_class) {
53 }
54
55 virtual void Run() OVERRIDE {
56 thread_checker_class_->DoStuff();
57 }
58
59 private:
60 ThreadCheckerClass* thread_checker_class_;
61
62 DISALLOW_COPY_AND_ASSIGN(CallDoStuffOnThread);
63};
64
65// Deletes ThreadCheckerClass on a different thread.
66class DeleteThreadCheckerClassOnThread : public butil::SimpleThread {

Callers

nothing calls this directly

Calls 1

DoStuffMethod · 0.45

Tested by

no test coverage detected