Fix bugs in as_awaitable, let_error and sync_wait#253
Merged
dietmarkuehl merged 2 commits intobemanproject:mainfrom Apr 12, 2026
Merged
Fix bugs in as_awaitable, let_error and sync_wait#253dietmarkuehl merged 2 commits intobemanproject:mainfrom
as_awaitable, let_error and sync_wait#253dietmarkuehl merged 2 commits intobemanproject:mainfrom
Conversation
Collaborator
Author
|
I've noticed a data-race in ex::run_loop loop;
std::jthread worker{[&loop] {
loop.run();
}};
auto _ = ex::sync_wait(ex::just() | ex::continues_on(loop.get_scheduler())).value();
loop.finish();execution/include/beman/execution/detail/run_loop.hpp Lines 177 to 183 in 8c46474 Can't unlock before notify_one, otherwise it will trigger the similar scenario as demonstrated in https://gcc.godbolt.org/z/zanf1avxa
|
as_awaitable and let_erroras_awaitable, let_error and sync_wait
dietmarkuehl
approved these changes
Apr 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
execution/include/beman/execution/detail/let.hpp
Lines 273 to 278 in 8c46474
The following code fails to compile due to an issue in the current
letalgorithm implementation. Sincestd::variant::emplaceis never noexcept,noexcept(let_bind(...))always resolves tofalse. This imposes a requirement that theletsender's receiver must support an error channel (set_error), causing the compilation failure for the code below.