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