MCPcopy Create free account
hub / github.com/3rdparty/libprocess / _check_discarded

Function _check_discarded

include/process/check.hpp:76–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75template <typename T>
76Option<Error> _check_discarded(const process::Future<T>& f)
77{
78 if (f.isPending()) {
79 return Error("is PENDING");
80 } else if (f.isReady()) {
81 return Error("is READY");
82 } else if (f.isFailed()) {
83 return Error("is FAILED: " + f.failure());
84 } else {
85 CHECK(f.isDiscarded());
86 return None();
87 }
88}
89
90
91template <typename T>

Callers

nothing calls this directly

Calls 4

isPendingMethod · 0.80
isReadyMethod · 0.80
isFailedMethod · 0.80
isDiscardedMethod · 0.80

Tested by

no test coverage detected