Bläddra i källkod

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

Clarify add_done_callback works on both success and failure
Mehrdad Afshari 7 år sedan
förälder
incheckning
86d7509c6a
1 ändrade filer med 2 tillägg och 1 borttagningar
  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.