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

Function select

3rdparty/libprocess/include/process/future.hpp:951–963  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949
950template <typename T>
951void select(
952 const Future<T>& future,
953 std::shared_ptr<Promise<Future<T>>> promise)
954{
955 // We never fail the future associated with our promise.
956 assert(!promise->future().isFailed());
957
958 if (promise->future().isPending()) { // No-op if it's discarded.
959 if (future.isReady()) { // We only set the promise if a future is ready.
960 promise->set(future);
961 }
962 }
963}
964
965} // namespace internal {
966

Callers 3

TESTFunction · 0.85
foreachFunction · 0.85
receiveMethod · 0.85

Calls 7

promiseFunction · 0.85
isFailedMethod · 0.80
isReadyMethod · 0.80
bindFunction · 0.70
futureMethod · 0.45
isPendingMethod · 0.45
setMethod · 0.45

Tested by 1

TESTFunction · 0.68