LCOV - code coverage report
Current view: top level - src - epoll_context.cpp (source / functions) Coverage Total Hit
Test: coverage_filtered.info Lines: 100.0 % 15 15
Test Date: 2026-02-04 16:37:34 Functions: 100.0 % 3 3

            Line data    Source code
       1              : //
       2              : // Copyright (c) 2026 Steve Gerbino
       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/corosio
       8              : //
       9              : 
      10              : #include <boost/corosio/epoll_context.hpp>
      11              : 
      12              : #if BOOST_COROSIO_HAS_EPOLL
      13              : 
      14              : #include "src/detail/epoll/scheduler.hpp"
      15              : #include "src/detail/epoll/sockets.hpp"
      16              : #include "src/detail/epoll/acceptors.hpp"
      17              : 
      18              : #include <thread>
      19              : 
      20              : namespace boost::corosio {
      21              : 
      22          183 : epoll_context::
      23          183 : epoll_context()
      24          183 :     : epoll_context(std::thread::hardware_concurrency())
      25              : {
      26          183 : }
      27              : 
      28          184 : epoll_context::
      29              : epoll_context(
      30          184 :     unsigned concurrency_hint)
      31              : {
      32          368 :     sched_ = &make_service<detail::epoll_scheduler>(
      33          184 :         static_cast<int>(concurrency_hint));
      34              : 
      35              :     // Install socket/acceptor services.
      36              :     // These use socket_service and acceptor_service as key_type,
      37              :     // enabling runtime polymorphism.
      38          184 :     make_service<detail::epoll_socket_service>();
      39          184 :     make_service<detail::epoll_acceptor_service>();
      40          184 : }
      41              : 
      42          184 : epoll_context::
      43              : ~epoll_context()
      44              : {
      45          184 :     shutdown();
      46          184 :     destroy();
      47          184 : }
      48              : 
      49              : } // namespace boost::corosio
      50              : 
      51              : #endif // BOOST_COROSIO_HAS_EPOLL
        

Generated by: LCOV version 2.3