100.00% Lines (3/3) 100.00% Functions (2/2)
TLA Baseline Branch
Line Hits Code Line Hits Code
  1 + //
  2 + // Copyright (c) 2026 Vinnie Falco (vinnie.falco@gmail.com)
  3 + //
  4 + // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5 + // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6 + //
  7 + // Official repository: https://github.com/cppalliance/capy
  8 + //
  9 +
  10 + #ifndef BOOST_CAPY_ASIO_DETAIL_ASIO_CONTEXT_SERVICE
  11 + #define BOOST_CAPY_ASIO_DETAIL_ASIO_CONTEXT_SERVICE
  12 +
  13 + #include <boost/capy/ex/execution_context.hpp>
  14 +
  15 + namespace boost::capy::detail
  16 + {
  17 +
  18 + template<typename Context>
  19 + struct asio_context_service
  20 + : Context::service
  21 + , capy::execution_context
  22 + {
  23 + static Context::id id;
  24 +
HITGNC   25 + 3 asio_context_service(Context & ctx)
HITGNC   26 + 3 : Context::service(ctx) {}
HITGNC   27 + 6 void shutdown() override {capy::execution_context::shutdown();}
  28 + };
  29 +
  30 +
  31 + // asio_context_service is templated for this id.
  32 + template<typename Context>
  33 + Context::id asio_context_service<Context>::id;
  34 +
  35 + }
  36 +
  37 + #endif
  38 +