You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Anthony Molinaro (JIRA)" <ji...@apache.org> on 2010/08/20 20:40:17 UTC

[jira] Closed: (THRIFT-825) Erlang API improvement: allow to use atoms and tuples to point at the thrift client

     [ https://issues.apache.org/jira/browse/THRIFT-825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anthony Molinaro closed THRIFT-825.
-----------------------------------


> Erlang API improvement: allow to use atoms and tuples to point at the thrift client
> -----------------------------------------------------------------------------------
>
>                 Key: THRIFT-825
>                 URL: https://issues.apache.org/jira/browse/THRIFT-825
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Erlang - Compiler
>         Environment: Any environment
>            Reporter: Dmitry Demeshchuk
>         Attachments: thrift_client.erl.diff
>
>
> Here's the code from thrift_client.erl:
> call(Client, Function, Args)
>  when is_pid(Client), is_atom(Function), is_list(Args) ->
>    case gen_server:call(Client, {call, Function, Args}) of
>        R = {ok, _} -> R;
>        R = {error, _} -> R;
>        {exception, Exception} -> throw(Exception)
>    end.
> But one may want to use the Client variable as an atom (using erlang:register()) or as a tuple {Node, Pid}.
> So, it's better to remove the is_pid() check. If the Client variable is invalid - OTP will just raise the "noproc" exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.