Explorar o código

Merge pull request #14417 from mehrdada/clarify-future-add_done_callback

Clarify add_done_callback works on both success and failure
Mehrdad Afshari %!s(int64=7) %!d(string=hai) anos
pai
achega
86d7509c6a
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/python/grpcio/grpc/__init__.py

+ 2 - 1
src/python/grpcio/grpc/__init__.py

@@ -173,7 +173,8 @@ class Future(six.with_metaclass(abc.ABCMeta)):
         """Adds a function to be called at completion of the computation.
         """Adds a function to be called at completion of the computation.
 
 
         The callback will be passed this Future object describing the outcome
         The callback will be passed this Future object describing the outcome
-        of the computation.
+        of the computation.  Callbacks will be invoked after the future is
+        terimated, whether successfully or not.
 
 
         If the computation has already completed, the callback will be called
         If the computation has already completed, the callback will be called
         immediately.
         immediately.