From fe931d152695950fe1115abcc2bd779a96be239a Mon Sep 17 00:00:00 2001 From: David Reiss Date: Tue, 24 Mar 2009 20:02:08 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757993 13f79535-47bb-0310-9956-ffa450edef68 --- compiler/cpp/src/generate/t_erl_generator.cc | 2 +- lib/erl/src/thrift_client.erl | 2 +- lib/erl/src/thrift_processor.erl | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/cpp/src/generate/t_erl_generator.cc b/compiler/cpp/src/generate/t_erl_generator.cc index 90e95bed..e7648baf 100644 --- a/compiler/cpp/src/generate/t_erl_generator.cc +++ b/compiler/cpp/src/generate/t_erl_generator.cc @@ -676,7 +676,7 @@ void t_erl_generator::generate_function_info(t_service* tservice, 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(); diff --git a/lib/erl/src/thrift_client.erl b/lib/erl/src/thrift_client.erl index 40eb5dde..4ed21c96 100644 --- a/lib/erl/src/thrift_client.erl +++ b/lib/erl/src/thrift_client.erl @@ -265,7 +265,7 @@ receive_function_result(State = #state{protocol = Proto, read_result(_State, _Function, - async_void) -> + oneway_void) -> {ok, ok}; read_result(State = #state{protocol = Proto, diff --git a/lib/erl/src/thrift_processor.erl b/lib/erl/src/thrift_processor.erl index 33446660..63409505 100644 --- a/lib/erl/src/thrift_processor.erl +++ b/lib/erl/src/thrift_processor.erl @@ -62,7 +62,7 @@ handle_function(State=#thrift_processor{in_protocol = IProto, 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 @@ handle_success(State = #thrift_processor{out_protocol = OProto, 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. -- 2.17.1