Răsfoiți Sursa

Clarify add_done_callback works on both success and failure

Mehrdad Afshari 8 ani în urmă
părinte
comite
db04c18289
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  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.