Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for async_rw_mutex #1356

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

msimberg
Copy link
Contributor

Part of #49.

Will likely conflict with #1355, so let's get that in first.

@msimberg msimberg self-assigned this Nov 28, 2024
Copy link

codacy-production bot commented Nov 28, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.05% (target: -1.00%) 100.00% (target: 90.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (f182d67) 18212 13736 75.42%
Head commit (66173a7) 18213 (+1) 13745 (+9) 75.47% (+0.05%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1356) 1 1 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Copy link

@albestro albestro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a curiosity, but for the rest thanks for the nice documentation!

Comment on lines +75 to +78
// Start and wait for all the work to finish.
tt::sync_wait(ex::when_all(std::move(rw_access1), std::move(ro_access1),
std::move(ro_access2), std::move(ro_access3),
std::move(rw_access2)));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: in principle, given that DAG, can we sync_wait just the last readwrite access?

My doubt is this one. They do not depend on each other as sender, but the mutex implicitly creates a dependency. This "difference" (if it is a difference, or is it just conceptual?) requires that we start each sender independently, or we can just sync_wait the last one and all the chain is started as if they were actually dependent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

3 participants