Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4448

Golang: do something with context.Context

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.11.0
    • 0.12.0
    • Go - Library
    • None
    • Patch Available

    Description

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

      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 canceled or timed out via the context.

      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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jking3 James E. King III
            johnboiles John Boiles
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment