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

Function _check_pending

include/process/check.hpp:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43template <typename T>
44Option<Error> _check_pending(const process::Future<T>& f)
45{
46 if (f.isReady()) {
47 return Error("is READY");
48 } else if (f.isDiscarded()) {
49 return Error("is DISCARDED");
50 } else if (f.isFailed()) {
51 return Error("is FAILED: " + f.failure());
52 } else {
53 CHECK(f.isPending());
54 return None();
55 }
56}
57
58
59template <typename T>

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected