{"action":"opened","issue":{"url":"https://api.github.com/repos/uber/tchannel-go/issues/124","labels_url":"https://api.github.com/repos/uber/tchannel-go/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/uber/tchannel-go/issues/124/comments","events_url":"https://api.github.com/repos/uber/tchannel-go/issues/124/events","html_url":"https://github.com/uber/tchannel-go/issues/124","id":123555623,"number":124,"title":"Implement cancel","user":{"login":"prashantv","id":140159,"avatar_url":"https://avatars.githubusercontent.com/u/140159?v=3","gravatar_id":"","url":"https://api.github.com/users/prashantv","html_url":"https://github.com/prashantv","followers_url":"https://api.github.com/users/prashantv/followers","following_url":"https://api.github.com/users/prashantv/following{/other_user}","gists_url":"https://api.github.com/users/prashantv/gists{/gist_id}","starred_url":"https://api.github.com/users/prashantv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashantv/subscriptions","organizations_url":"https://api.github.com/users/prashantv/orgs","repos_url":"https://api.github.com/users/prashantv/repos","events_url":"https://api.github.com/users/prashantv/events{/privacy}","received_events_url":"https://api.github.com/users/prashantv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-22T21:03:31Z","updated_at":"2015-12-22T21:03:31Z","closed_at":null,"body":"Migrated from https://github.com/uber/tchannel/issues/278\r\n\r\n- [ ] ``OutboundCall`` should create cancellable child ``context.Context`` for each call\r\n- [ ] ``InboundCall`` tracks cancel() function for root ``context.Context``\r\n- [ ] Add ``OutboundCall.Cancel`` operation, which sends Cancel message to peer\r\n- [ ] Update inbound handler to process cancel messages.  Should call cancel() func on associated ``context.Context`` (which has side effect of cancelling child requests in progress) and send Error/cancelled frame back to initiating peer\r\n- [ ] Update outbound call res handler to invoke call-specific ``cancel`` on receipt of an Error/cancelled message\r\n\r\n__To figure out__\r\n\r\n* Any other way to cancel a running server-side op?  If so, need some mechanism for detecting this and returning Error/cancelled frame back to initiating peer\r\n\r\n* If waiting on an outbound Context results in ``context.Cancelled``, should we send a cancel message to the peer?  Without this we won't proactively cancel outbound requests triggered from a cancelled server request, but with this we'll need some way to determine whether the outbound Context was cancelled in response to the parent context being cancelled, or in response to an Error/cancel frame being returned by the peer on which we are waiting.\r\n\r\n"}}