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

context: add basic support for context #6

Merged
merged 1 commit into from
Oct 24, 2018
Merged

Conversation

abraithwaite
Copy link
Owner

This doesn't add full support. Doing so requires cooperation from the
libraries. However, this does solve the case where a request is
cancelled, we don't block and return control to the caller. The
consequence is that we're leaking a goroutine for the remainder of the
open request to memcache/redis (which shouldn't be long)

Both libraries expose the ability to set timeouts on connections. It
might be worthwhile to see how to integrate them more seamlessly:

https://godoc.org/github.com/bradfitz/gomemcache/memcache#ConnectTimeoutError
https://godoc.org/github.com/gomodule/redigo/redis#DoWithTimeout

This doesn't add full support.  Doing so requires cooperation from the
libraries.  However, this does solve the case where a request is
cancelled, we don't block and return control to the caller.  The
consequence is that we're leaking a goroutine for the remainder of the
open request to memcache/redis (which shouldn't be long)

Both libraries expose the ability to set timeouts on connections.  It
might be worthwhile to see how to integrate them more seamlessly:

https://godoc.org/github.com/bradfitz/gomemcache/memcache#ConnectTimeoutError
https://godoc.org/github.com/gomodule/redigo/redis#DoWithTimeout
@abraithwaite abraithwaite merged commit 6fd8092 into master Oct 24, 2018
@abraithwaite abraithwaite deleted the minor-improvements branch October 24, 2018 01:13
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

1 participant