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

STEllAR-GROUP / hpx / #844

02 Dec 2022 12:37AM UTC coverage: 85.8% (+0.2%) from 85.634%
#844

push

StellarBot
Merge #6084

6084: Renaming hpx::apply and friends to hpx::post r=hkaiser a=hkaiser

- this is needed to be able to rename invoke_fused to apply later

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



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

468 of 468 new or added lines in 96 files covered. (100.0%)

171389 of 199753 relevant lines covered (85.8%)

1914550.97 hits per line

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

0.0
/libs/full/runtime_components/src/console_error_sink.cpp
1
//  Copyright (c) 2007-2021 Hartmut Kaiser
2
//  Copyright (c) 2011      Bryce Lelbach
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
#include <hpx/config.hpp>
9
#include <hpx/agas/addressing_service.hpp>
10
#include <hpx/async_distributed/continuation.hpp>
11
#include <hpx/modules/async_distributed.hpp>
12
#include <hpx/modules/errors.hpp>
13
#include <hpx/runtime_components/console_error_sink.hpp>
14
#include <hpx/runtime_components/server/console_error_sink.hpp>
15
#include <hpx/runtime_local/state.hpp>
16

17
#include <exception>
18

19
///////////////////////////////////////////////////////////////////////////////
20
namespace hpx { namespace components {
21

22
    // Stub function which applies the console_error_sink action.
23
    void console_error_sink(
×
24
        hpx::id_type const& dst, std::exception_ptr const& e)
25
    {
26
        // Report the error only if the thread-manager is up.
27
        if (threads::threadmanager_is(hpx::state::running))
×
28
        {
29
            if (threads::get_self_ptr())
×
30
            {
31
                hpx::async<server::console_error_sink_action>(dst, e).get();
×
32
            }
×
33
            else
34
            {
35
                // FIXME: This should use a sync_put_parcel.
36
                hpx::post<server::console_error_sink_action>(dst, e);
×
37
            }
38
        }
×
39
    }
×
40

41
    /// Stub function which applies the console_error_sink action.
42
    ///
43
    /// \note Must be called from a HPX-thread.
44
    void console_error_sink(std::exception_ptr const& e)
×
45
    {
46
        if (HPX_UNLIKELY(!threads::get_self_ptr()))
×
47
        {
48
            HPX_THROW_EXCEPTION(null_thread_id,
×
49
                "components::console_error_sink",
50
                "console_error_sink was not called from a HPX-thread");
51
        }
52

53
        // Report the error only if the thread-manager is up.
54
        if (threads::threadmanager_is(hpx::state::running))
×
55
        {
56
            // retrieve console locality
57
            naming::gid_type console_gid;
×
58
            naming::get_agas_client().get_console_locality(console_gid);
×
59
            hpx::id_type dst(
×
60
                console_gid, hpx::id_type::management_type::unmanaged);
61

62
            hpx::async<server::console_error_sink_action>(dst, e).get();
×
63
        }
×
64
    }
×
65
}}    // namespace hpx::components
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