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

accept recv-only channels for all cancellations #3271

Merged
merged 1 commit into from
Jul 14, 2017

Commits on Jul 14, 2017

  1. accept recv-only channels for cancellations

    Cancellation channels are often derived from a Context, which
    returns a directional `<-chan struct{}` from Done(). In order to use
    this with parts of of the consul API, one is required to create a new
    channel and dispatch a separate goroutine to watch for context
    cancellation and close the new channel.
    
    Changing the signature for the methods that take cancellation channels
    will allow easier integration with existing uses of Context. Since the
    cancellation pattern only reads from these channels, there should be no
    backwards incompatibility with existing codebases, and most of the
    methods already accept only the correct type.
    jbardin committed Jul 14, 2017
    Configuration menu
    Copy the full SHA
    6b0683c View commit details
    Browse the repository at this point in the history