Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shambackends
src
EventList.cpp
Go to the documentation of this file.
1
// -------------------------------------------------------//
2
//
3
// SHAMROCK code for hydrodynamics
4
// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5
// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6
// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7
//
8
// -------------------------------------------------------//
9
16
#include "
shambackends/EventList.hpp
"
17
#include "
shamcomm/logs.hpp
"
18
19
sham::EventList::~EventList
() noexcept(false) {
20
if
(!consumed && !events.empty()) {
21
std::string log_str = shambase::format(
22
"EventList destroyed without being consumed :\n -> creation : {}"
,
23
loc_build.
format_one_line
());
24
25
for
(
auto
&e : events) {
26
e.wait();
27
}
28
throw
shambase::make_except_with_loc<std::runtime_error>
(log_str);
29
}
30
}
EventList.hpp
sham::EventList::~EventList
~EventList() noexcept(false)
Destructor for EventList.
Definition
EventList.cpp:19
shambase::throw_with_loc
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
Definition
exception.hpp:132
logs.hpp
SourceLocation::format_one_line
std::string format_one_line() const
format the location in a one liner
Definition
SourceLocation.cpp:42
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8