You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2009/03/24 21:02:09 UTC

svn commit: r757993 - in /incubator/thrift/trunk: compiler/cpp/src/generate/t_erl_generator.cc lib/erl/src/thrift_client.erl lib/erl/src/thrift_processor.erl

Author: dreiss
Date: Tue Mar 24 20:02:08 2009
New Revision: 757993

URL: http://svn.apache.org/viewvc?rev=757993&view=rev
Log:
THRIFT-136. s/async/oneway/ in Erlang

This is kind of a bummer because it requires a simultaneous
code regeneration and library upgrade, and possibly also a
server restart.  I'm not sure if it is worth it, since the
only benefit is a little code clarity.

Modified:
    incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc
    incubator/thrift/trunk/lib/erl/src/thrift_client.erl
    incubator/thrift/trunk/lib/erl/src/thrift_processor.erl

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc?rev=757993&r1=757992&r2=757993&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc Tue Mar 24 20:02:08 2009
@@ -676,7 +676,7 @@
     indent(f_service_) <<
         generate_type_term(tfunction->get_returntype(), false) << ";" << endl;
   else if (tfunction->is_oneway())
-    indent(f_service_) << "async_void;" << endl;
+    indent(f_service_) << "oneway_void;" << endl;
   else
     indent(f_service_) << "{struct, []}" << ";" << endl;
   indent_down();

Modified: incubator/thrift/trunk/lib/erl/src/thrift_client.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/src/thrift_client.erl?rev=757993&r1=757992&r2=757993&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/erl/src/thrift_client.erl (original)
+++ incubator/thrift/trunk/lib/erl/src/thrift_client.erl Tue Mar 24 20:02:08 2009
@@ -265,7 +265,7 @@
 
 read_result(_State,
             _Function,
-            async_void) ->
+            oneway_void) ->
     {ok, ok};
 
 read_result(State = #state{protocol = Proto,

Modified: incubator/thrift/trunk/lib/erl/src/thrift_processor.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/src/thrift_processor.erl?rev=757993&r1=757992&r2=757993&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/erl/src/thrift_processor.erl (original)
+++ incubator/thrift/trunk/lib/erl/src/thrift_processor.erl Tue Mar 24 20:02:08 2009
@@ -62,7 +62,7 @@
 
 handle_function_catch(State = #thrift_processor{service = Service},
                       Function, ErrType, ErrData) ->
-    IsOneway = Service:function_info(Function, reply_type) =:= async_void,
+    IsOneway = Service:function_info(Function, reply_type) =:= oneway_void,
 
     case {ErrType, ErrData} of
         _ when IsOneway ->
@@ -96,7 +96,7 @@
              ok when ReplyType == {struct, []} ->
                  send_reply(OProto, Function, ?tMessageType_REPLY, {ReplyType, {StructName}});
 
-             ok when ReplyType == async_void ->
+             ok when ReplyType == oneway_void ->
                  %% no reply for oneway void
                  ok
          end.