THRIFT-136. s/async/oneway/ in comments

This is an internal-only change.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757990 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc b/compiler/cpp/src/generate/t_cpp_generator.cc
index 788f7ac..5ad390a 100644
--- a/compiler/cpp/src/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/generate/t_cpp_generator.cc
@@ -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;
diff --git a/compiler/cpp/src/generate/t_hs_generator.cc b/compiler/cpp/src/generate/t_hs_generator.cc
index bcc5ff5..18a07f0 100644
--- a/compiler/cpp/src/generate/t_hs_generator.cc
+++ b/compiler/cpp/src/generate/t_hs_generator.cc
@@ -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;
diff --git a/compiler/cpp/src/generate/t_java_generator.cc b/compiler/cpp/src/generate/t_java_generator.cc
index 057e6ce..e258a47 100644
--- a/compiler/cpp/src/generate/t_java_generator.cc
+++ b/compiler/cpp/src/generate/t_java_generator.cc
@@ -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;
diff --git a/compiler/cpp/src/generate/t_ocaml_generator.cc b/compiler/cpp/src/generate/t_ocaml_generator.cc
index 1464618..a60e00c 100644
--- a/compiler/cpp/src/generate/t_ocaml_generator.cc
+++ b/compiler/cpp/src/generate/t_ocaml_generator.cc
@@ -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;
diff --git a/compiler/cpp/src/generate/t_perl_generator.cc b/compiler/cpp/src/generate/t_perl_generator.cc
index 9a6535d..02ac779 100644
--- a/compiler/cpp/src/generate/t_perl_generator.cc
+++ b/compiler/cpp/src/generate/t_perl_generator.cc
@@ -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;
diff --git a/compiler/cpp/src/generate/t_php_generator.cc b/compiler/cpp/src/generate/t_php_generator.cc
index b0e4ac6..f74076c 100644
--- a/compiler/cpp/src/generate/t_php_generator.cc
+++ b/compiler/cpp/src/generate/t_php_generator.cc
@@ -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;
diff --git a/compiler/cpp/src/generate/t_py_generator.cc b/compiler/cpp/src/generate/t_py_generator.cc
index 52e2992..a5c6151 100644
--- a/compiler/cpp/src/generate/t_py_generator.cc
+++ b/compiler/cpp/src/generate/t_py_generator.cc
@@ -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;
diff --git a/compiler/cpp/src/generate/t_rb_generator.cc b/compiler/cpp/src/generate/t_rb_generator.cc
index 6b057f0..d3ac711 100644
--- a/compiler/cpp/src/generate/t_rb_generator.cc
+++ b/compiler/cpp/src/generate/t_rb_generator.cc
@@ -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;
diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/server/TNonblockingServer.cpp
index 583877b..34a0d88 100644
--- a/lib/cpp/src/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/server/TNonblockingServer.cpp
@@ -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;
 
diff --git a/lib/erl/src/thrift_client.erl b/lib/erl/src/thrift_client.erl
index 802c009..40eb5dd 100644
--- a/lib/erl/src/thrift_client.erl
+++ b/lib/erl/src/thrift_client.erl
@@ -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) ->
diff --git a/lib/erl/src/thrift_processor.erl b/lib/erl/src/thrift_processor.erl
index 0ad6557..2f5a81b 100644
--- a/lib/erl/src/thrift_processor.erl
+++ b/lib/erl/src/thrift_processor.erl
@@ -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.
 
diff --git a/lib/java/src/org/apache/thrift/server/TNonblockingServer.java b/lib/java/src/org/apache/thrift/server/TNonblockingServer.java
index e5f49df..0904745 100644
--- a/lib/java/src/org/apache/thrift/server/TNonblockingServer.java
+++ b/lib/java/src/org/apache/thrift/server/TNonblockingServer.java
@@ -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 {
diff --git a/lib/java/test/org/apache/thrift/test/TestClient.java b/lib/java/test/org/apache/thrift/test/TestClient.java
index d868999..91b3ec5 100644
--- a/lib/java/test/org/apache/thrift/test/TestClient.java
+++ b/lib/java/test/org/apache/thrift/test/TestClient.java
@@ -353,7 +353,7 @@
         }
         System.out.print("}\n");
 
-        // Test async
+        // Test oneway
         System.out.print("testAsync(3)...");
         long startAsync = System.nanoTime();
         testClient.testAsync(3);
diff --git a/lib/py/src/server/TNonblockingServer.py b/lib/py/src/server/TNonblockingServer.py
index a588fe3..816827c 100644
--- a/lib/py/src/server/TNonblockingServer.py
+++ b/lib/py/src/server/TNonblockingServer.py
@@ -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
diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift
index e7152c4..c93fed5 100644
--- a/test/ThriftTest.thrift
+++ b/test/ThriftTest.thrift
@@ -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)
 }
 
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index 5350297..b12a4b5 100644
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -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:
      *
diff --git a/test/erl/src/test_disklog.erl b/test/erl/src/test_disklog.erl
index 81b7b50..0cc03bc 100644
--- a/test/erl/src/test_disklog.erl
+++ b/test/erl/src/test_disklog.erl
@@ -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"),
 
diff --git a/tutorial/tutorial.thrift b/tutorial/tutorial.thrift
index 17c5827..52e1b75 100644
--- a/tutorial/tutorial.thrift
+++ b/tutorial/tutorial.thrift
@@ -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()