Pārlūkot izejas kodu

Clarify add_done_callback works on both success and failure

Mehrdad Afshari 7 gadi atpakaļ
vecāks
revīzija
db04c18289
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  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.