Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ab07fd1
added and updated compiler explorer link
dietmarkuehl Jul 20, 2026
fa9cb1e
started to determine whether the implementation matches the specifica…
dietmarkuehl Jul 20, 2026
a429b38
added HIDE-SCHED to the status
dietmarkuehl Jul 20, 2026
4494870
added the status for the various queries (and fixed a few small things)
dietmarkuehl Jul 21, 2026
4b46959
added a status section on schedulers
dietmarkuehl Jul 21, 2026
53dcf32
Merge branch 'main' into update-status
dietmarkuehl Jul 22, 2026
4f45509
added the status for more sections (and introduced an under construct…
dietmarkuehl Jul 22, 2026
4fb28f4
clang-format
dietmarkuehl Jul 22, 2026
049fee0
added a bit more status
dietmarkuehl Jul 27, 2026
e8f7886
Merge branch 'main' into update-status
dietmarkuehl Jul 29, 2026
d977e94
fix a few module issues with clang
dietmarkuehl Jul 29, 2026
c127c98
added more missing bits and the status for [exec.snd.expos]
dietmarkuehl Aug 2, 2026
ebb3206
added another section assessing the completeness of the implementation
dietmarkuehl Aug 2, 2026
b32b311
added status for the sender factories
dietmarkuehl Aug 5, 2026
3211da2
fixed a few issues reported by Claude and clang-formatted
dietmarkuehl Aug 5, 2026
b9a5ab2
fixed get_forward_progess_guarantee and some documentation issues
dietmarkuehl Aug 5, 2026
6ab5250
clang-format
dietmarkuehl Aug 5, 2026
1aeef6c
Merge branch 'main' into update-status
dietmarkuehl Aug 5, 2026
681386a
fixed scheduler and receiver concepts
dietmarkuehl Aug 5, 2026
fae5e8b
some of the get_..._scheduler queries were not quite right
dietmarkuehl Aug 5, 2026
9cfe36e
delete an operation state move constructor
dietmarkuehl Aug 5, 2026
0b1963e
fixed the implementation file linke for connect-awaitable-promise
dietmarkuehl Aug 5, 2026
258e7b5
improved a few tests and added more status
dietmarkuehl Aug 6, 2026
8a1d47c
fixed the starts_on sender environment
dietmarkuehl Aug 6, 2026
05721c4
complete looking at the sender algorithms
dietmarkuehl Aug 7, 2026
b727e56
added the status for the section on completion signatures
dietmarkuehl Aug 8, 2026
9a1ae62
added status for the environments section
dietmarkuehl Aug 8, 2026
c915d47
added the contexts section to the implementation status
dietmarkuehl Aug 8, 2026
e29141f
updated the awaiter tools sectios for implementation status
dietmarkuehl Aug 8, 2026
90b87cf
completed a pass checking the implementation status
dietmarkuehl Aug 9, 2026
3aca15d
fixed a number formatting issues
dietmarkuehl Aug 9, 2026
6c83672
trying to fix some issues reported by CI
dietmarkuehl Aug 9, 2026
bceb188
Merge branch 'main' into update-status
dietmarkuehl Aug 9, 2026
01ce53b
fixed various modules issues with gcc (not everything fixed, yet)
dietmarkuehl Aug 9, 2026
de74424
fix a few more errors noticed by CI
dietmarkuehl Aug 9, 2026
3e81040
working around <version> not working (although crudely for now)
dietmarkuehl Aug 9, 2026
7aaea00
changed the order of includes vs. imports to avoid symbol issues with…
dietmarkuehl Aug 10, 2026
dbc4205
trying to work around gcc issues
dietmarkuehl Aug 10, 2026
eeac9ce
fixed a problem with the stop_token example and fixed code formatting
dietmarkuehl Aug 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->

<!-- markdownlint-disable line-length -->
[![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg)](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#the-beman-library-maturity-model)![Standard Target](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg)[![Coverage](https://coveralls.io/repos/github/bemanproject/execution/badge.svg?branch=main)](https://coveralls.io/github/bemanproject/execution?branch=main)[![Compiler Explorer Example](https://img.shields.io/badge/Try%20it%20on%20Compiler%20Explorer-grey?logo=compilerexplorer&logoColor=67c52a)](https://godbolt.org/z/9nfa3rTTK)
[![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg)](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#the-beman-library-maturity-model)![Standard Target](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg)[![Coverage](https://coveralls.io/repos/github/bemanproject/execution/badge.svg?branch=main)](https://coveralls.io/github/bemanproject/execution?branch=main)[![Compiler Explorer Example](https://img.shields.io/badge/Try%20it%20on%20Compiler%20Explorer-grey?logo=compilerexplorer&logoColor=67c52a)](https://godbolt.org/z/jeMEWGYbM)
<!-- markdownlint-restore -->


Expand Down
301 changes: 301 additions & 0 deletions docs/implementation-status.md

Large diffs are not rendered by default.

449 changes: 416 additions & 33 deletions docs/overview.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if(PROJECT_IS_TOP_LEVEL)
enable_testing()
endif()

set(TODO stop_token) #-dk:TODO including that causes a linker error
set(TODO suspend_never) #-dk:TODO including that causes ASAN errors

set(EXAMPLES
Expand All @@ -33,6 +32,7 @@ set(EXAMPLES
sender_demo
stackoverflow
stopping
stop_token
when_all_cancel
)

Expand Down
5 changes: 5 additions & 0 deletions examples/allocator.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
// examples/allocator.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <iostream>
#include <string>
#include <memory>
#include <memory_resource>
#include <span>
#include <vector>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand Down
5 changes: 5 additions & 0 deletions examples/doc_just.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <cassert>
#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <string>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand Down
7 changes: 6 additions & 1 deletion examples/doc_just_error.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
// examples/doc_just_error.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <system_error>
#include <cassert>
#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <system_error>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand Down
7 changes: 6 additions & 1 deletion examples/doc_just_stopped.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
// examples/doc_just_stopped.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <system_error>
#include <cassert>
#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <system_error>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand Down
5 changes: 5 additions & 0 deletions examples/inspect.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
// examples/inspectc.pp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <iostream>
#include <ostream>
#include <sstream>
#include <string>
#include <typeinfo>
#include <tuple>
#include <variant>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand Down
11 changes: 9 additions & 2 deletions examples/intro_1_hello_world.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
// examples/intro_1_hello_world.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <iostream>
#include <optional>
#include <string>
#include <tuple>
#include <variant>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand All @@ -20,15 +25,17 @@ using namespace std::string_literals;

int main() {
// clang-format off
#if !defined(__GNUC__) || defined(__clang__) || (__GNUC__ > 15) || !defined(BEMAN_HAS_MODULES)
auto [result] =
ex::sync_wait(
ex::when_all(
ex::just("hello, "s),
ex::just("world"s)
) | ex::then([](auto const& s1, auto const& s2) { return s1 + s2; })
) .value_or(std::tuple(""s))
).value_or(std::tuple(""s))
;
#endif
// clang-format on

std::cout << result << '\n';
// std::cout << std::get<0>(v) << '\n';
}
7 changes: 7 additions & 0 deletions examples/intro_2_hello_async.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
// examples/intro_2_hello_async.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <chrono>
#include <iostream>
#include <queue>
#include <string>
#include <thread>
#include <tuple>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand All @@ -23,6 +28,7 @@ using namespace std::chrono_literals;

int main() {
std::cout << std::unitbuf;
#if !defined(__GNUC__) || defined(__clang__) || (__GNUC__ > 15) || !defined(BEMAN_HAS_MODULES)
intro::timer timer;

// clang-format off
Expand All @@ -42,4 +48,5 @@ int main() {
// clang-format on

std::cout << result << "\n";
#endif
}
5 changes: 5 additions & 0 deletions examples/intro_5_consumer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// examples/intro_5_consumer.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <beman/execution/detail/suppress_push.hpp>
#include <chrono>
//-dk:TODO restore if that actually works #include <expected>
Expand All @@ -9,6 +13,7 @@
#include <tuple>
#include <variant>
#include <cinttypes>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
import beman.execution.detail;
Expand Down
5 changes: 5 additions & 0 deletions examples/modules_and_header.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
// examples/modules_and_header.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <tuple>
#endif
import beman.execution;
namespace ex = beman::execution;

Expand Down
7 changes: 7 additions & 0 deletions examples/playground.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
// examples/playground.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <iostream>
#include <string>
#include <tuple>
#include <variant>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand All @@ -16,8 +21,10 @@ namespace ex = ::beman::execution;
// ----------------------------------------------------------------------------

int main() {
#if !defined(__GNUC__) || defined(__clang__) || (__GNUC__ > 15) || !defined(BEMAN_HAS_MODULES)
auto [result] = ex::sync_wait(ex::when_all(ex::just(std::string("hello, ")), ex::just(std::string("world"))) |
ex::then([](const auto& s1, const auto& s2) { return s1 + s2; }))
.value_or(std::tuple(std::string("oops")));
std::cout << "result='" << result << "'\n";
#endif
}
15 changes: 11 additions & 4 deletions examples/sender_demo.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
// examples/sender_demo.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <iostream>
#include <memory_resource>
#include <string>
#include <type_traits>
#include <utility>
#include <variant>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
import beman.execution.detail;
Expand Down Expand Up @@ -60,19 +65,21 @@ static_assert(ex::sender_in<just_sender<std::pmr::string>>);

int main() {
try {
auto j = just_sender<std::pmr::string>{std::pmr::string("value")};
auto t = std::move(j) | ex::then([](const std::pmr::string& v) { return v + " then"; });
auto w = ex::when_all(std::move(t));
auto e =
auto j = just_sender<std::pmr::string>{std::pmr::string("value")};
auto t = std::move(j) | ex::then([](const std::pmr::string& v) { return v + " then"; });
auto w = ex::when_all(std::move(t));
[[maybe_unused]] auto e =
ex::write_env(std::move(w), ex::detail::make_env(ex::get_allocator, std::pmr::polymorphic_allocator<>()));

std::cout << "before start\n";
#if !defined(__GNUC__) || defined(__clang__) || (__GNUC__ > 15) || !defined(BEMAN_HAS_MODULES)
auto r = ex::sync_wait(std::move(e));
if (r) {
auto [v] = *r;
std::cout << "produced='" << v << "'\n";
} else
std::cout << "operation was cancelled\n";
#endif
std::cout << "after start\n";
} catch (const std::exception& ex) {
std::cout << "ERROR: " << ex.what() << "\n";
Expand Down
5 changes: 5 additions & 0 deletions examples/stackoverflow.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
// examples/stackoverflow.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <coroutine>
#include <iostream>
#include <memory>
#include <type_traits>
#include <utility>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand Down
12 changes: 10 additions & 2 deletions examples/stop_token.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
// examples/stop_token.cpp
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <condition_variable>
#include <iostream>
#include <exception>
#include <latch>
#include <mutex>
#include <thread>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand Down Expand Up @@ -87,9 +92,12 @@ auto inactive(const Token& token) -> void {
template <typename Token>
auto inactive(Token token) -> void {
::std::condition_variable cond;
stop_callback_for_t cb(token, [&cond] { cond.notify_one(); });
::std::mutex lock;
stop_callback_for_t cb(token, [&cond, &lock] {
::std::lock_guard guard(lock);
cond.notify_one();
});

::std::mutex lock;
::std::unique_lock guard(lock);
cond.wait(guard, [token] { return token.stop_requested(); });
print("inactive thread done (condition_variable)\n");
Expand Down
6 changes: 6 additions & 0 deletions examples/stopping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
// which gets started in a thread. To stop this thread
// the corresponding stop source is requested to stop.

#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <chrono>
#include <iostream>
#include <mutex>
#include <thread>
#include <cassert>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand All @@ -19,6 +24,7 @@ import beman.execution;
#endif

using namespace std::chrono;
using namespace std::chrono_literals;
namespace ex = beman::execution;

// ----------------------------------------------------------------------------
Expand Down
10 changes: 8 additions & 2 deletions examples/when_all_cancel.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// examples/when_all_cancel.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <cassert>
#include <beman/execution/detail/common.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <exception>
#include <iostream>
#include <optional>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <variant>
#include <cassert>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
Expand Down Expand Up @@ -146,6 +150,7 @@ eager(Sender&&) -> eager<std::remove_cvref_t<Sender>>;
} // namespace

auto main() -> int {
#if !defined(__GNUC__) || defined(__clang__) || (__GNUC__ > 15) || !defined(BEMAN_HAS_MODULES)
auto s{eager{ex::when_all(await_stop{})}};

ex::inplace_stop_source source{};
Expand All @@ -155,4 +160,5 @@ auto main() -> int {
std::cout << "started\n";
source.request_stop();
std::cout << "done\n";
#endif
}
1 change: 1 addition & 0 deletions include/beman/execution/detail/as_except_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace beman::execution::detail {
* \internal
*/
template <typename Error>
//-dk:TODO add a proper precondition
decltype(auto) as_except_ptr(Error&& error) {
if constexpr (::std::same_as<::std::exception_ptr, ::std::decay_t<Error>>) {
return ::std::forward<Error>(error);
Expand Down
Loading