mirror of https://github.com/hashicorp/consul
Browse Source
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.pull/3274/head
James Bardin
7 years ago
committed by
James Phillips
2 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue