| 422 | } |
| 423 | |
| 424 | void any_completion_executor_execute_test() |
| 425 | { |
| 426 | int count = 0; |
| 427 | thread_pool pool(1); |
| 428 | boost::asio::any_completion_executor ex(pool.executor()); |
| 429 | |
| 430 | ex.execute(bindns::bind(increment, &count)); |
| 431 | |
| 432 | boost::asio::prefer(ex, boost::asio::execution::blocking.possibly).execute( |
| 433 | bindns::bind(increment, &count)); |
| 434 | |
| 435 | boost::asio::prefer(ex, |
| 436 | boost::asio::execution::blocking.possibly, |
| 437 | boost::asio::execution::outstanding_work.tracked |
| 438 | ).execute(bindns::bind(increment, &count)); |
| 439 | |
| 440 | boost::asio::prefer(ex, |
| 441 | boost::asio::execution::blocking.possibly, |
| 442 | boost::asio::execution::outstanding_work.untracked |
| 443 | ).execute(bindns::bind(increment, &count)); |
| 444 | |
| 445 | boost::asio::prefer(ex, |
| 446 | boost::asio::execution::blocking.possibly, |
| 447 | boost::asio::execution::outstanding_work.untracked, |
| 448 | boost::asio::execution::relationship.continuation |
| 449 | ).execute(bindns::bind(increment, &count)); |
| 450 | |
| 451 | pool.wait(); |
| 452 | |
| 453 | BOOST_ASIO_CHECK(count == 5); |
| 454 | } |
| 455 | |
| 456 | BOOST_ASIO_TEST_SUITE |
| 457 | ( |