facebook/swift — pull request #112 by andrewcox (2013-08-16 21:08:42+00:00)
Title: Context cleanup

- Get rid of unnecessary methodName arguments for ContextChain
- Change Exception arguments for handlers to Throwable (since this is the type received for failed futures)
- Fix a bug that would cause contextChain.done() to be called early for async client calls
- Make async client call futures non-cancellable. There are some problems with allowing cancellation of client call futures:
1) i want to ensure that context.done() is called after any other context calls, but before any future callbacks (so that time spent running a future callback is not counted as context time for stats collection) and having cancellable futures complicates this a lot
2) cancellable client call futures introduces requirements for synchronization because the future's set() and setException() are always called on the client's IO thread, but cancel() can be caused from anywhere
3) and in return, it doesn't really offer much benefit because once the thrift async call request is dispatched, it's usually executing in another process on another server, and you can't recall that request