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

Method notified

3rdparty/libprocess/include/process/sequence.hpp:160–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 // Invoked when a notifier is set.
159 template <typename T>
160 static void notified(
161 Owned<Promise<T>> promise,
162 const lambda::function<Future<T>()>& callback)
163 {
164 if (promise->future().hasDiscard()) {
165 // The user has shown the intention to discard this callback
166 // (i.e., by calling future.discard()). As a result, we will
167 // just skip this callback.
168 promise->discard();
169 } else {
170 promise->associate(callback());
171 }
172 }
173
174 Future<Nothing> last;
175};

Callers

nothing calls this directly

Calls 5

callbackFunction · 0.85
hasDiscardMethod · 0.80
associateMethod · 0.80
futureMethod · 0.45
discardMethod · 0.45

Tested by

no test coverage detected