• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #867

15 Jan 2023 08:00PM UTC coverage: 86.487% (+0.5%) from 85.951%
#867

push

StellarBot
Merge #6135

6135: Fixing warnings reported by MSVC analysis r=hkaiser a=hkaiser

- adding MSVC specific #pragma's to suppress the benign warnings


Co-authored-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>

120 of 120 new or added lines in 33 files covered. (100.0%)

174599 of 201880 relevant lines covered (86.49%)

1945607.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/libs/core/threading_base/src/get_default_timer_service.cpp
1
//  Copyright (c) 2007-2023 Hartmut Kaiser
2
//  Copyright (c)      2011 Bryce Lelbach
3
//  Copyright (c)      2020 Nikunj Gupta
4
//
5
//  SPDX-License-Identifier: BSL-1.0
6
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
7
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8

9
#include <hpx/assert.hpp>
10
#include <hpx/errors/error.hpp>
11
#include <hpx/errors/exception.hpp>
12
#include <hpx/threading_base/detail/get_default_timer_service.hpp>
13

14
#include <asio/io_context.hpp>
15

16
namespace hpx::threads::detail {
17

18
    static get_default_timer_service_type get_default_timer_service_f;
1,253✔
19

20
    void set_get_default_timer_service(get_default_timer_service_type f)
1,223✔
21
    {
22
        get_default_timer_service_f = HPX_MOVE(f);
1,223✔
23
    }
1,223✔
24

25
    asio::io_context& get_default_timer_service()
11,898✔
26
    {
27
        if (detail::get_default_timer_service_f)
11,898✔
28
        {
29
            return detail::get_default_timer_service_f();
11,898✔
30
        }
31
        else
32
        {
33
#if defined(HPX_HAVE_TIMER_POOL)
34
            HPX_THROW_EXCEPTION(hpx::error::invalid_status,
×
35
                "hpx::threads::detail::get_default_timer_service",
36
                "No timer service installed. When running timed "
37
                "threads without a runtime a timer service has to be "
38
                "installed manually using "
39
                "hpx::threads::detail::set_get_default_timer_service.");
40
#else
41
            HPX_THROW_EXCEPTION(hpx::error::invalid_status,
42
                "hpx::threads::detail::get_default_timer_service",
43
                "No timer service installed. Rebuild HPX with "
44
                "HPX_WITH_TIMER_POOL=ON or provide a timer service "
45
                "manually using "
46
                "hpx::threads::detail::set_get_default_timer_service.");
47
#endif
48
        }
49
    }
×
50
}    // namespace hpx::threads::detail
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc