MCPcopy Create free account
hub / github.com/apache/mesos / add_done_callback

Method add_done_callback

src/python/cli/src/mesos/futures.py:74–87  ·  view source on GitHub ↗
(self, fn)

Source from the content-addressed store, hash-verified

72 return None
73
74 def add_done_callback(self, fn):
75 run = False
76 with self._lock:
77 if self._done:
78 run = True
79 else:
80 self._callbacks.append(fn)
81 if run:
82 try:
83 fn(self)
84 except:
85 # TODO(benh): Log if Exception, but semantics tell
86 # us to ignore regardless.
87 pass
88
89 def set_result(self, result):
90 with self._lock:

Callers 1

as_completedFunction · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected