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

STEllAR-GROUP / hpx / #857

28 Dec 2022 11:12PM UTC coverage: 86.543% (-0.06%) from 86.602%
#857

push

StellarBot
Merge #6118

6118: Modernize modules from level 17, 18, 19, and 20 r=hkaiser a=hkaiser

working towards https://github.com/STEllAR-GROUP/hpx/issues/5497

Modules:
- core/threading_base
- full/command_line_handling
- core/io_service
- core/schedulers
- core/synchronization
- core/futures
- core/thread_pools
- core/lcos_local
- core/pack_traversal
- core/resource_partitioner
- core/threading
- full/naming_base


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

849 of 849 new or added lines in 98 files covered. (100.0%)

174389 of 201505 relevant lines covered (86.54%)

1916353.25 hits per line

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

33.33
/libs/core/threading_base/include/hpx/threading_base/execution_agent.hpp
1
//  Copyright (c) 2019 Thomas Heller
2
//
3
//  SPDX-License-Identifier: BSL-1.0
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
#pragma once
8

9
#include <hpx/config.hpp>
10

11
#include <hpx/coroutines/detail/coroutine_impl.hpp>
12
#include <hpx/coroutines/detail/coroutine_stackful_self.hpp>
13
#include <hpx/coroutines/thread_enums.hpp>
14
#include <hpx/coroutines/thread_id_type.hpp>
15
#include <hpx/execution_base/agent_base.hpp>
16
#include <hpx/execution_base/context_base.hpp>
17
#include <hpx/execution_base/resource_base.hpp>
18
#include <hpx/timing/steady_clock.hpp>
19

20
#include <cstddef>
21
#include <string>
22

23
#include <hpx/config/warnings_prefix.hpp>
24

25
namespace hpx::threads {
26

27
    struct HPX_CORE_EXPORT execution_context : hpx::execution_base::context_base
682,472✔
28
    {
29
        hpx::execution_base::resource_base const& resource()
×
30
            const noexcept override
31
        {
32
            return resource_;
×
33
        }
34

35
        hpx::execution_base::resource_base resource_;
36
    };
37

38
    struct HPX_CORE_EXPORT execution_agent : hpx::execution_base::agent_base
341,297✔
39
    {
40
        explicit execution_agent(
41
            coroutines::detail::coroutine_impl* coroutine) noexcept;
42

43
        std::string description() const override;
44

45
        execution_context const& context() const noexcept override
×
46
        {
47
            return context_;
×
48
        }
49

50
        void yield(char const* desc) override;
51
        void yield_k(std::size_t k, char const* desc) override;
52
        void suspend(char const* desc) override;
53
        void resume(char const* desc) override;
54
        void abort(char const* desc) override;
55
        void sleep_for(hpx::chrono::steady_duration const& sleep_duration,
56
            char const* desc) override;
57
        void sleep_until(hpx::chrono::steady_time_point const& sleep_time,
58
            char const* desc) override;
59

60
    private:
61
        coroutines::detail::coroutine_stackful_self self_;
62

63
        hpx::threads::thread_restart_state do_yield(
64
            char const* desc, threads::thread_schedule_state state);
65

66
        void do_resume(
67
            char const* desc, hpx::threads::thread_restart_state statex);
68

69
        execution_context context_;
70
    };
71
}    // namespace hpx::threads
72

73
#include <hpx/config/warnings_suffix.hpp>
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