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

STEllAR-GROUP / hpx / #882

31 Aug 2023 07:44PM UTC coverage: 41.798% (-44.7%) from 86.546%
#882

push

19442 of 46514 relevant lines covered (41.8%)

126375.38 hits per line

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

58.33
/libs/full/async_distributed/include/hpx/async_distributed/trigger.hpp
1
//  Copyright (c) 2007-2020 Hartmut Kaiser
2
//  Copyright (c) 2016 Thomas Heller
3
//
4
//  SPDX-License-Identifier: BSL-1.0
5
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
6
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7

8
#pragma once
9

10
#include <hpx/config.hpp>
11
#include <hpx/async_distributed/continuation_fwd.hpp>
12
#include <hpx/modules/tag_invoke.hpp>
13
#include <hpx/modules/type_support.hpp>
14

15
#include <exception>
16
#include <utility>
17

18
namespace hpx { namespace actions {
19

20
    ///////////////////////////////////////////////////////////////////////////
21
    template <typename Result, typename RemoteResult, typename F,
22
        typename... Ts>
23
    void trigger(typed_continuation<Result, RemoteResult>&& cont, F&& f,
40,333✔
24
        Ts&&... vs) noexcept
25
    {
26
        try
27
        {
28
            cont.trigger_value(
40,343✔
29
                HPX_INVOKE(HPX_FORWARD(F, f), HPX_FORWARD(Ts, vs)...));
40,323✔
30
        }
31
        catch (...)
×
32
        {
33
            // make sure hpx::exceptions are propagated back to the client
34
            cont.trigger_error(std::current_exception());
×
35
        }
36
    }
40,333✔
37

38
    // Overload when return type is "void" aka util::unused_type
39
    template <typename Result, typename F, typename... Ts>
40
    void trigger(typed_continuation<Result, util::unused_type>&& cont, F&& f,
7✔
41
        Ts&&... vs) noexcept
42
    {
43
        try
44
        {
45
            HPX_INVOKE(HPX_FORWARD(F, f), HPX_FORWARD(Ts, vs)...);
×
46
            cont.trigger();
7✔
47
        }
48
        catch (...)
×
49
        {
50
            // make sure hpx::exceptions are propagated back to the client
51
            cont.trigger_error(std::current_exception());
×
52
        }
53
    }
7✔
54
}}    // namespace hpx::actions
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

© 2026 Coveralls, Inc