[ 
https://issues.apache.org/jira/browse/THRIFT-3041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14368459#comment-14368459
 ] 

ASF GitHub Bot commented on THRIFT-3041:
----------------------------------------

GitHub user yelirekim opened a pull request:

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

    THRIFT-3041: Add an option to generate asynchronous clients for Cocoa

    This adds the option `async_clients` to those available for Cocoa in the 
compiler.  When applied, it will generate client implementations which invoke 
their methods asynchronously.  This also necessarily includes interface 
declarations for asynchronous transports in the Cocoa library.

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

    $ git pull https://github.com/yelirekim/thrift feature/cocoa-async-clients

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

    https://github.com/apache/thrift/pull/400.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 #400
    
----
commit 47ae371e62787f27a79172b19280c98d26838d8b
Author: Mike Riley <mikeri...@yelirekim.com>
Date:   2015-03-18T21:36:56Z

    Support for async clients

commit 575a8c03031bfcbaa7caa0faa487cce41b886a54
Author: Mike Riley <mikeri...@yelirekim.com>
Date:   2015-03-19T03:20:05Z

    Formatting fixes

commit 572d10743c985b97f3415c075550cad298567e3a
Author: Mike Riley <mikeri...@yelirekim.com>
Date:   2015-03-19T03:37:25Z

    Adding text explaining what this option does

----


> Generate asynchronous clients for Cocoa
> ---------------------------------------
>
>                 Key: THRIFT-3041
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3041
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Cocoa - Compiler, Cocoa - Library
>            Reporter: Mike Riley
>             Fix For: 0.9.3
>
>         Attachments: async-clients.diff
>
>
> I've been using thrift on a decent variety of iOS projects for the last ~4 
> years. Every time I set a new project up, I invariably end up inventing some 
> way to invoke thrift RPC calls via Objective-C block syntax.  I usually end 
> up ripping apart the generated classes by declaring their private methods, 
> and then writing a bunch of boilerplate all so that I can avoid using the 
> provided HTTP client, which makes synchronous requests.
> This is a decent stab at letting the generator take care of this problem for 
> me, and everyone else.  It ended up being pretty heavy handed with 
> t_cocoa_generator.cc, but I've spent a while testing this and am pretty 
> confident I managed to avoid breaking anything.  I realize this is a large 
> change, so I've put up the sandbox I was using to test on github if that 
> makes it easier to review.  If you want the tl;dr; about what practical 
> changes this has on generated sources:
> https://github.com/yelirekim/thrift-cocoa-love/blob/master/thrift-cocoa-love/ViewController.m
> https://github.com/yelirekim/thrift-cocoa-love/blob/master/gen-cocoa/asdf.h
> I'd welcome feedback or proposed modifications if this approach isn't quite 
> right.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to