| 58 | { |
| 59 | public: |
| 60 | my_object() |
| 61 | { |
| 62 | // register which functions we want to run as threads. We want one thread running |
| 63 | // thread1() and two threads to run thread2(). So we will have a total of 3 threads |
| 64 | // running. |
| 65 | register_thread(*this,&my_object::thread1); |
| 66 | register_thread(*this,&my_object::thread2); |
| 67 | register_thread(*this,&my_object::thread2); |
| 68 | |
| 69 | // start all our registered threads going by calling the start() function |
| 70 | start(); |
| 71 | } |
| 72 | |
| 73 | ~my_object() |
| 74 | { |