thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (THRIFT-4448) Golang: do something with context.Context
Date Thu, 01 Feb 2018 09:00:00 GMT


ASF GitHub Bot commented on THRIFT-4448:

Github user dcelasun commented on the issue:
    It would be nice to add a client test using e.g `context.WithTimeout()`. Something like:
    - In the handler function, sleep for 100ms before returning
    - In the client, call the RPC with `context.WithTimeout(context.Background(), 50*time.Millisecond)`
    - Check if `ctx.Err() == context.Canceled`
    Otherwise LGTM.

> Golang: do something with context.Context
> -----------------------------------------
>                 Key: THRIFT-4448
>                 URL:
>             Project: Thrift
>          Issue Type: Task
>          Components: Go - Library
>    Affects Versions: 0.11.0
>            Reporter: John Boiles
>            Priority: Major
> PR Here:
> 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
> 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 {{}} 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.

This message was sent by Atlassian JIRA

View raw message