Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/asio/handler_continuation_hook.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@16 | 1 // |
Chris@16 | 2 // handler_continuation_hook.hpp |
Chris@16 | 3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Chris@16 | 4 // |
Chris@101 | 5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) |
Chris@16 | 6 // |
Chris@16 | 7 // Distributed under the Boost Software License, Version 1.0. (See accompanying |
Chris@16 | 8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 9 // |
Chris@16 | 10 |
Chris@16 | 11 #ifndef BOOST_ASIO_HANDLER_CONTINUATION_HOOK_HPP |
Chris@16 | 12 #define BOOST_ASIO_HANDLER_CONTINUATION_HOOK_HPP |
Chris@16 | 13 |
Chris@16 | 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) |
Chris@16 | 15 # pragma once |
Chris@16 | 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) |
Chris@16 | 17 |
Chris@16 | 18 #include <boost/asio/detail/config.hpp> |
Chris@16 | 19 |
Chris@16 | 20 #include <boost/asio/detail/push_options.hpp> |
Chris@16 | 21 |
Chris@16 | 22 namespace boost { |
Chris@16 | 23 namespace asio { |
Chris@16 | 24 |
Chris@16 | 25 /// Default continuation function for handlers. |
Chris@16 | 26 /** |
Chris@16 | 27 * Asynchronous operations may represent a continuation of the asynchronous |
Chris@16 | 28 * control flow associated with the current handler. The implementation can use |
Chris@16 | 29 * this knowledge to optimise scheduling of the handler. |
Chris@16 | 30 * |
Chris@16 | 31 * Implement asio_handler_is_continuation for your own handlers to indicate |
Chris@16 | 32 * when a handler represents a continuation. |
Chris@16 | 33 * |
Chris@16 | 34 * The default implementation of the continuation hook returns <tt>false</tt>. |
Chris@16 | 35 * |
Chris@16 | 36 * @par Example |
Chris@16 | 37 * @code |
Chris@16 | 38 * class my_handler; |
Chris@16 | 39 * |
Chris@16 | 40 * bool asio_handler_is_continuation(my_handler* context) |
Chris@16 | 41 * { |
Chris@16 | 42 * return true; |
Chris@16 | 43 * } |
Chris@16 | 44 * @endcode |
Chris@16 | 45 */ |
Chris@16 | 46 inline bool asio_handler_is_continuation(...) |
Chris@16 | 47 { |
Chris@16 | 48 return false; |
Chris@16 | 49 } |
Chris@16 | 50 |
Chris@16 | 51 } // namespace asio |
Chris@16 | 52 } // namespace boost |
Chris@16 | 53 |
Chris@16 | 54 #include <boost/asio/detail/pop_options.hpp> |
Chris@16 | 55 |
Chris@16 | 56 #endif // BOOST_ASIO_HANDLER_CONTINUATION_HOOK_HPP |