MCPcopy Create free account
hub / github.com/boostorg/asio / decrement_to_zero

Function decrement_to_zero

test/thread_pool.cpp:32–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void decrement_to_zero(thread_pool* pool, int* count)
33{
34 if (*count > 0)
35 {
36 --(*count);
37
38 int before_value = *count;
39 boost::asio::post(*pool, bindns::bind(decrement_to_zero, pool, count));
40
41 // Handler execution cannot nest, so count value should remain unchanged.
42 BOOST_ASIO_CHECK(*count == before_value);
43 }
44}
45
46void nested_decrement_to_zero(thread_pool* pool, int* count)
47{

Callers

nothing calls this directly

Calls 2

postFunction · 0.50
bindFunction · 0.50

Tested by

no test coverage detected