GitHub user johnboiles opened a pull request:

    https://github.com/apache/thrift/pull/1459

    Golang: do something with context.Context

    This patch wires through `context.Context` such that it can be used in in 
`http.Request`'s `WithContext` method. This allows Thrift HTTP requests to time 
out out based on `Context.Deadline`.
    
    This patch breaks support for go<1.7 so it's not ready to ship, but I'm 
hoping to get some direction on this. When does Thrift expect to drop support 
of go1.7? It looks like the current solution is to duplicate files that need to 
use `golang.org/x/net/context` and add a `// +build !go1.7` but duplication 
seems unsustainable as the `context` package is imported more places.
    
    Go 1.7 was released 15 August 2016. Given Golang has had significant 
performance improvements in most dot releases, I suspect most production 
services stay reasonably up to date. Here at Periscope/Twitter we're on 
go1.9.1, and we're a fairly large organization.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/johnboiles/thrift johnboiles/go-context-http

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/1459.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1459
    
----
commit 757bd5301dbfe923df6b4e21d1054fec4abc833f
Author: John Boiles <johnaboiles@...>
Date:   2018-01-05T22:37:05Z

    Golang: do something with context.Context
    
    (At least in http_client.go)

----


---

Reply via email to