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:01:26 UTC
svn commit: r757990 - in /incubator/thrift/trunk: compiler/cpp/src/generate/
lib/cpp/src/server/ lib/erl/src/ lib/java/src/org/apache/thrift/server/
lib/java/test/org/apache/thrift/test/ lib/py/src/server/ test/
test/cpp/src/ test/erl/src/ tutorial/
Author: dreiss
Date: Tue Mar 24 20:01:25 2009
New Revision: 757990
URL: http://svn.apache.org/viewvc?rev=757990&view=rev
Log:
THRIFT-136. s/async/oneway/ in comments
This is an internal-only change.
Modified:
incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc
incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc
incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc
incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc
incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc
incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp
incubator/thrift/trunk/lib/erl/src/thrift_client.erl
incubator/thrift/trunk/lib/erl/src/thrift_processor.erl
incubator/thrift/trunk/lib/java/src/org/apache/thrift/server/TNonblockingServer.java
incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/TestClient.java
incubator/thrift/trunk/lib/py/src/server/TNonblockingServer.py
incubator/thrift/trunk/test/ThriftTest.thrift
incubator/thrift/trunk/test/cpp/src/TestClient.cpp
incubator/thrift/trunk/test/erl/src/test_disklog.erl
incubator/thrift/trunk/tutorial/tutorial.thrift
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc Tue Mar 24 20:01:25 2009
@@ -1698,7 +1698,7 @@
scope_down(f_service_);
f_service_ << endl;
- // Generate recv function only if not an async function
+ // Generate recv function only if not an oneway function
if (!(*f_iter)->is_oneway()) {
t_struct noargs(program_);
t_function recv_function((*f_iter)->get_returntype(),
@@ -2100,7 +2100,7 @@
}
f_service_ << indent() << "}" << endl;
- // Shortcut out here for async functions
+ // Shortcut out here for oneway functions
if (tfunction->is_oneway()) {
f_service_ <<
indent() << "return;" << endl;
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc Tue Mar 24 20:01:25 2009
@@ -1020,7 +1020,7 @@
- // Shortcut out here for async functions
+ // Shortcut out here for oneway functions
if (tfunction->is_oneway()) {
f_service_ <<
indent() << "return ()" << endl;
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc Tue Mar 24 20:01:25 2009
@@ -2066,7 +2066,7 @@
const std::vector<t_field*>& xceptions = xs->get_members();
vector<t_field*>::const_iterator x_iter;
- // Declare result for non async function
+ // Declare result for non oneway function
if (!tfunction->is_oneway()) {
f_service_ <<
indent() << resultname << " result = new " << resultname << "();" << endl;
@@ -2125,7 +2125,7 @@
f_service_ << endl;
}
- // Shortcut out here for async functions
+ // Shortcut out here for oneway functions
if (tfunction->is_oneway()) {
f_service_ <<
indent() << "return;" << endl;
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc Tue Mar 24 20:01:25 2009
@@ -1096,7 +1096,7 @@
const std::vector<t_field*>& xceptions = xs->get_members();
vector<t_field*>::const_iterator x_iter;
- // Declare result for non async function
+ // Declare result for non oneway function
if (!tfunction->is_oneway()) {
f_service_ <<
indent() << "let result = new " << resultname << " in" << endl;
@@ -1149,7 +1149,7 @@
- // Shortcut out here for async functions
+ // Shortcut out here for oneway functions
if (tfunction->is_oneway()) {
f_service_ <<
indent() << "()" << endl;
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc Tue Mar 24 20:01:25 2009
@@ -824,7 +824,7 @@
const std::vector<t_field*>& xceptions = xs->get_members();
vector<t_field*>::const_iterator x_iter;
- // Declare result for non async function
+ // Declare result for non oneway function
if (!tfunction->is_oneway()) {
f_service_ <<
indent() << "my $result = new " << resultname << "();" << endl;
@@ -877,7 +877,7 @@
f_service_ << "}" << endl;
}
- // Shortcut out here for async functions
+ // Shortcut out here for oneway functions
if (tfunction->is_oneway()) {
f_service_ <<
indent() << "return;" << endl;
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc Tue Mar 24 20:01:25 2009
@@ -1057,7 +1057,7 @@
const std::vector<t_field*>& xceptions = xs->get_members();
vector<t_field*>::const_iterator x_iter;
- // Declare result for non async function
+ // Declare result for non oneway function
if (!tfunction->is_oneway()) {
f_service_ <<
indent() << "$result = new " << resultname << "();" << endl;
@@ -1108,7 +1108,7 @@
f_service_ << "}" << endl;
}
- // Shortcut out here for async functions
+ // Shortcut out here for oneway functions
if (tfunction->is_oneway()) {
f_service_ <<
indent() << "return;" << endl;
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc Tue Mar 24 20:01:25 2009
@@ -1494,7 +1494,7 @@
const std::vector<t_field*>& xceptions = xs->get_members();
vector<t_field*>::const_iterator x_iter;
- // Declare result for non async function
+ // Declare result for non oneway function
if (!tfunction->is_oneway()) {
f_service_ <<
indent() << "result = " << resultname << "()" << endl;
@@ -1520,7 +1520,7 @@
}
f_service_ << ")" << endl;
- // Shortcut out here for async functions
+ // Shortcut out here for oneway functions
if (tfunction->is_oneway()) {
f_service_ <<
indent() << "return d" << endl;
@@ -1643,7 +1643,7 @@
}
}
- // Shortcut out here for async functions
+ // Shortcut out here for oneway functions
if (tfunction->is_oneway()) {
f_service_ <<
indent() << "return" << endl;
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc Tue Mar 24 20:01:25 2009
@@ -883,7 +883,7 @@
const std::vector<t_field*>& xceptions = xs->get_members();
vector<t_field*>::const_iterator x_iter;
- // Declare result for non async function
+ // Declare result for non oneway function
if (!tfunction->is_oneway()) {
f_service_ <<
indent() << "result = " << resultname << ".new()" << endl;
@@ -933,7 +933,7 @@
indent(f_service_) << "end" << endl;
}
- // Shortcut out here for async functions
+ // Shortcut out here for oneway functions
if (tfunction->is_oneway()) {
f_service_ <<
indent() << "return" << endl;
Modified: incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp Tue Mar 24 20:01:25 2009
@@ -337,7 +337,7 @@
return;
}
- // In this case, the request was asynchronous and we should fall through
+ // In this case, the request was oneway and we should fall through
// right back into the read frame header state
goto LABEL_APP_INIT;
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=757990&r1=757989&r2=757990&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:01:25 2009
@@ -98,7 +98,7 @@
gen_server:cast(Client, {call, Function, Args}).
%% Sends a function call but does not read the result. This is useful
-%% if you're trying to log non-async function calls to write-only
+%% if you're trying to log non-oneway function calls to write-only
%% transports like thrift_disk_log_transport.
send_call(Client, Function, Args)
when is_pid(Client), is_atom(Function), is_list(Args) ->
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=757990&r1=757989&r2=757990&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:01:25 2009
@@ -97,7 +97,7 @@
send_reply(OProto, Function, ?tMessageType_REPLY, {ReplyType, {StructName}});
ok when ReplyType == async_void ->
- %% no reply for async void
+ %% no reply for oneway void
ok
end.
Modified: incubator/thrift/trunk/lib/java/src/org/apache/thrift/server/TNonblockingServer.java
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/src/org/apache/thrift/server/TNonblockingServer.java?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/java/src/org/apache/thrift/server/TNonblockingServer.java (original)
+++ incubator/thrift/trunk/lib/java/src/org/apache/thrift/server/TNonblockingServer.java Tue Mar 24 20:01:25 2009
@@ -634,7 +634,7 @@
readBufferBytesAllocated -= buffer_.array().length;
if (response_.len() == 0) {
- // go straight to reading again. this was probably an async method
+ // go straight to reading again. this was probably an oneway method
state_ = AWAITING_REGISTER_READ;
buffer_ = null;
} else {
Modified: incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/TestClient.java
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/TestClient.java?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/TestClient.java (original)
+++ incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/TestClient.java Tue Mar 24 20:01:25 2009
@@ -353,7 +353,7 @@
}
System.out.print("}\n");
- // Test async
+ // Test oneway
System.out.print("testAsync(3)...");
long startAsync = System.nanoTime();
testClient.testAsync(3);
Modified: incubator/thrift/trunk/lib/py/src/server/TNonblockingServer.py
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/py/src/server/TNonblockingServer.py?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/py/src/server/TNonblockingServer.py (original)
+++ incubator/thrift/trunk/lib/py/src/server/TNonblockingServer.py Tue Mar 24 20:01:25 2009
@@ -162,7 +162,7 @@
self.len = ''
self.message = struct.pack('!i', len(message)) + message
if len(message) == 0:
- # it was async request, do not write answer
+ # it was a oneway request, do not write answer
self.status = WAIT_LEN
else:
self.status = SEND_ANSWER
Modified: incubator/thrift/trunk/test/ThriftTest.thrift
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/ThriftTest.thrift?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/test/ThriftTest.thrift (original)
+++ incubator/thrift/trunk/test/ThriftTest.thrift Tue Mar 24 20:01:25 2009
@@ -102,7 +102,7 @@
Xtruct testMultiException(string arg0, string arg1) throws(Xception err1, Xception2 err2)
- /* Test async void */
+ /* Test oneway void */
async void testAsync(1:i32 secondsToSleep)
}
Modified: incubator/thrift/trunk/test/cpp/src/TestClient.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/cpp/src/TestClient.cpp?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/test/cpp/src/TestClient.cpp (original)
+++ incubator/thrift/trunk/test/cpp/src/TestClient.cpp Tue Mar 24 20:01:25 2009
@@ -420,7 +420,7 @@
printf(" exception\nFAILURE\n");
}
- /* test async void */
+ /* test oneway void */
{
printf("testClient.testAsync(3) =>");
uint64_t startAsync = now();
@@ -434,8 +434,8 @@
}
/**
- * redo a simple test after the async to make sure we aren't "off by one" --
- * if the server treated async void like normal void, this next test will
+ * redo a simple test after the oneway to make sure we aren't "off by one" --
+ * if the server treated oneway void like normal void, this next test will
* fail since it will get the void confirmation rather than the correct
* result. In this circumstance, the client will throw the exception:
*
Modified: incubator/thrift/trunk/test/erl/src/test_disklog.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/erl/src/test_disklog.erl?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/test/erl/src/test_disklog.erl (original)
+++ incubator/thrift/trunk/test/erl/src/test_disklog.erl Tue Mar 24 20:01:25 2009
@@ -14,12 +14,12 @@
io:format("Client started~n"),
- % We have to make async calls into this client only since otherwise it will try
+ % We have to make oneway calls into this client only since otherwise it will try
% to read from the disklog and go boom.
{ok, ok} = thrift_client:call(Client, testAsync, [16#deadbeef]),
io:format("Call written~n"),
- % Use the send_call method to write a non-async call into the log
+ % Use the send_call method to write a non-oneway call into the log
ok = thrift_client:send_call(Client, testString, [<<"hello world">>]),
io:format("Non-async call sent~n"),
@@ -46,12 +46,12 @@
io:format("Client started~n"),
- % We have to make async calls into this client only since otherwise it will try
+ % We have to make oneway calls into this client only since otherwise it will try
% to read from the disklog and go boom.
{ok, ok} = thrift_client:call(Client, testAsync, [16#deadbeef]),
io:format("Call written~n"),
- % Use the send_call method to write a non-async call into the log
+ % Use the send_call method to write a non-oneway call into the log
ok = thrift_client:send_call(Client, testString, [<<"hello world">>]),
io:format("Non-async call sent~n"),
Modified: incubator/thrift/trunk/tutorial/tutorial.thrift
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/tutorial/tutorial.thrift?rev=757990&r1=757989&r2=757990&view=diff
==============================================================================
--- incubator/thrift/trunk/tutorial/tutorial.thrift (original)
+++ incubator/thrift/trunk/tutorial/tutorial.thrift Tue Mar 24 20:01:25 2009
@@ -117,8 +117,8 @@
i32 calculate(1:i32 logid, 2:Work w) throws (1:InvalidOperation ouch),
/**
- * This method has an async modifier. That means the client only makes
- * a request and does not listen for any response at all. Async methods
+ * This method has a oneway modifier. That means the client only makes
+ * a request and does not listen for any response at all. Oneway methods
* must be void.
*/
async void zip()