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

Simplify recently added context support #57

Merged
merged 1 commit into from
Sep 20, 2020
Merged

Simplify recently added context support #57

merged 1 commit into from
Sep 20, 2020

Conversation

NathanBaulch
Copy link
Contributor

The excellent idea of passing context when getting the connection by @bancek actually allows us to simplify (reverse) most of my original context support changes! Context only needs to be passed when creating the Conn, so no need for a context argument on every Conn member function.

This PR simplifies context passing and also fixes nil-context errors when using the original non-context aware Mutex APIs. There's no breaking changes (now that v4 is out there), it just simplifies the internals.

I was going to try and get this pushed before #54 #55 #56 were merged but you beat me to it @hjr265. Better late than never!

@hjr265 hjr265 merged commit 6c7240c into go-redsync:master Sep 20, 2020
@hjr265
Copy link
Member

hjr265 commented Sep 20, 2020

Thanks again, @NathanBaulch!

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.

None yet

3 participants