Optional Recursive Mutex in Asio Integration - #1846
Open
RobertLeahy wants to merge 3 commits into
Open
Conversation
ericniebler
approved these changes
Feb 14, 2026
Collaborator
|
/ok to test 72c179e |
Collaborator
|
@RobertLeahy did you see my comments? also, this PR needs a rebase. |
Contributor
Author
Yes, just haven't looped back to incorporating any of the feedback. |
Reduces the size of a "frame" by removing the std::unique_lock member variable and making the "frame" itself the lock guard. This is the lock management method shown when presenting exec::asio::completion_token in the CppCon 2025 talk "std::execution in Asio Codebases: Adopting Senders Without a Rewrite."
For general purpose (i.e. potentially multithreaded) use the asynchronous operations which result when passing the exec::asio:: completion_token and ::use_sender completion tokens must use a recursive mutex internally. However if the user knows that no multithreaded use will occur this recursive mutex is pure overhead. Provided the exec::asio::thread_unsafe_completion_token and _use_sender completion tokens which do not make use of a recursive mutex for the aforementioned use case.
RobertLeahy
force-pushed
the
optional_recursive_mutex_20260214
branch
from
August 1, 2026 16:45
72c179e to
6ffbd0a
Compare
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.
Please do not squash.
Resolves #1781.