Rev 1939 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1939 | Rev 1940 | ||
|---|---|---|---|
| Line 33... | Line 33... | ||
| 33 | this->tracker_ = TrackerPointer(new char); |
33 | this->tracker_ = TrackerPointer(new char); |
| 34 | } |
34 | } |
| 35 | 35 | ||
| 36 | IoService::~IoService() |
36 | IoService::~IoService() |
| 37 | { |
37 | { |
| 38 | std::cout << "~IoService() called!" << std::endl; |
- | |
| 39 | - | ||
| 40 | this->Stop(); |
38 | this->Stop(); |
| 41 | - | ||
| 42 | std::cout << "~IoService() called done!" << std::endl; |
- | |
| 43 | } |
39 | } |
| 44 | 40 | ||
| 45 | boost::asio::io_service& IoService::GetIoService() |
41 | boost::asio::io_service& IoService::GetIoService() |
| 46 | { |
42 | { |
| 47 | return this->io_service_; |
43 | return this->io_service_; |
| 48 | } |
44 | } |
| 49 | 45 | ||
| 50 | void IoService::Stop() |
46 | void IoService::Stop() |
| 51 | { |
47 | { |
| 52 | std::cout << "Stop() called!" << std::endl; |
- | |
| 53 | - | ||
| 54 | this->tracker_.reset(); |
48 | this->tracker_.reset(); |
| 55 | 49 | ||
| 56 | this->io_service_.stop(); |
50 | this->io_service_.stop(); |
| 57 | 51 | ||
| 58 | //this->thread_.interrupt(); |
52 | //this->thread_.interrupt(); |
| 59 | this->thread_.join(); |
53 | this->thread_.join(); |
| 60 | - | ||
| 61 | std::cout << "Stop() called done!" << std::endl; |
- | |
| 62 | } |
54 | } |
| 63 | 55 | ||
| 64 | }; // namespace common |
56 | }; // namespace common |
| 65 | }; // namespace atom |
57 | }; // namespace atom |