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 some helpers for acquiring locks #210

Merged
merged 2 commits into from
Jan 3, 2022
Merged

Conversation

zenhack
Copy link
Contributor

@zenhack zenhack commented Jan 2, 2022

This adds a couple helpers "With" and "Without", which make it easier
to follow where the boundaries of critical sections (and the holes in
them) are, when the helpers are applicable.

This is especially helpful in that using it consistently means places
where the lock management is not just a simple straight-line critical
section stand out.

This adds a couple helpers "With" and "Without", which  make it easier
to follow where the boundaries of critical sections (and the holes in
them) are, when the helpers are applicable.

This is especially helpful in that using it consistently means places
where the lock management is *not* just a simple straight-line critical
section stand out.
lthibault
lthibault previously approved these changes Jan 3, 2022
Copy link
Collaborator

@lthibault lthibault left a comment

Choose a reason for hiding this comment

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

Love this. In fact, I independently had the same idea a few months ago and never got around to implementing it.

Needless to say, approved.

answer.go Show resolved Hide resolved
@zenhack
Copy link
Contributor Author

zenhack commented Jan 3, 2022

Ah, I see the reason you didn't merge is because there were conflicts. Fixed.

@lthibault lthibault merged commit b55b450 into capnproto:main Jan 3, 2022
@zenhack zenhack deleted the with-without branch January 3, 2022 19:47
@zenhack zenhack restored the with-without branch April 3, 2022 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants