| 37 | } |
| 38 | |
| 39 | void decrement_to_zero(boost::asio::system_timer* t, int* count) |
| 40 | { |
| 41 | if (*count > 0) |
| 42 | { |
| 43 | --(*count); |
| 44 | |
| 45 | int before_value = *count; |
| 46 | |
| 47 | t->expires_at(t->expiry() + boost::asio::chrono::seconds(1)); |
| 48 | t->async_wait(bindns::bind(decrement_to_zero, t, count)); |
| 49 | |
| 50 | // Completion cannot nest, so count value should remain unchanged. |
| 51 | BOOST_ASIO_CHECK(*count == before_value); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | void increment_if_not_cancelled(int* count, |
| 56 | const boost::system::error_code& ec) |
nothing calls this directly
no test coverage detected