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 missing sync.NewCond wrapper #22

Merged
merged 1 commit into from
Oct 29, 2021
Merged

Conversation

ncw
Copy link
Contributor

@ncw ncw commented Oct 28, 2021

I noticed recently while integrating go-deadlock that it was missing a wrapper for sync.NewCond.

Here is a little patch to add it.

Thank you for a great package :-)


This change is Reviewable

@ncw
Copy link
Contributor Author

ncw commented Oct 28, 2021

PS as far as I know sync.NewCond was in go1.0 so doesn't need any build tags.

@codecov
Copy link

codecov bot commented Oct 28, 2021

Codecov Report

Merging #22 (8df648e) into master (4a6d8f3) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #22   +/-   ##
=======================================
  Coverage   87.09%   87.09%           
=======================================
  Files           2        2           
  Lines         217      217           
=======================================
  Hits          189      189           
  Misses         20       20           
  Partials        8        8           
Impacted Files Coverage Δ
deadlock.go 84.81% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a6d8f3...8df648e. Read the comment docs.

@sasha-s
Copy link
Owner

sasha-s commented Oct 29, 2021

Thank you for adding this. :lgtm_strong:

Copy link
Owner

@sasha-s sasha-s left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ncw)

@sasha-s sasha-s merged commit f58e139 into sasha-s:master Oct 29, 2021
@ncw ncw deleted the fix-missing-newcond branch October 29, 2021 10:43
@ncw
Copy link
Contributor Author

ncw commented Oct 29, 2021

Thanks for this great package!

I included it in the talk I gave on deadlocks at gophercon UK :-)

The video isn't up yet, alas, but should appear here in due course: https://www.youtube.com/c/GopherConUK/videos

@sasha-s
Copy link
Owner

sasha-s commented Oct 30, 2021

Thanks, will check it out when the video is up.
I looked code for your talk, it is great you are talking about recursive read locks (not obvious and bit me in the past).

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