Calls ThreadCheckerClass::DoStuff on another thread.
| 46 | |
| 47 | // Calls ThreadCheckerClass::DoStuff on another thread. |
| 48 | class 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. |
| 66 | class DeleteThreadCheckerClassOnThread : public butil::SimpleThread { |