Add support for custom handler tracking.

This commit is contained in:
Christopher Kohlhoff 2015-02-25 07:41:22 +01:00
parent 7c93097174
commit 7eee8f1875
2 changed files with 21 additions and 3 deletions

View File

@ -17,7 +17,9 @@
#include "asio/detail/config.hpp"
#if defined(ASIO_ENABLE_HANDLER_TRACKING)
#if defined(ASIO_CUSTOM_HANDLER_TRACKING)
# include ASIO_CUSTOM_HANDLER_TRACKING
#elif defined(ASIO_ENABLE_HANDLER_TRACKING)
# include "asio/error_code.hpp"
# include "asio/detail/cstdint.hpp"
# include "asio/detail/static_mutex.hpp"
@ -29,7 +31,19 @@
namespace asio {
namespace detail {
#if defined(ASIO_ENABLE_HANDLER_TRACKING)
#if defined(ASIO_CUSTOM_HANDLER_TRACKING)
// The user-specified header must define the following macros:
// - ASIO_INHERIT_TRACKED_HANDLER
// - ASIO_ALSO_INHERIT_TRACKED_HANDLER
// - ASIO_HANDLER_TRACKING_INIT
// - ASIO_HANDLER_CREATION(args)
// - ASIO_HANDLER_COMPLETION(args)
// - ASIO_HANDLER_INVOCATION_BEGIN(args)
// - ASIO_HANDLER_INVOCATION_END
// - ASIO_HANDLER_OPERATION(args)
#elif defined(ASIO_ENABLE_HANDLER_TRACKING)
class handler_tracking
{

View File

@ -17,7 +17,11 @@
#include "asio/detail/config.hpp"
#if defined(ASIO_ENABLE_HANDLER_TRACKING)
#if defined(ASIO_CUSTOM_HANDLER_TRACKING)
// The handler tracking implementation is provided by the user-specified header.
#elif defined(ASIO_ENABLE_HANDLER_TRACKING)
#include <cstdarg>
#include <cstdio>