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

Function _check_ready

include/process/check.hpp:60–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58
59template <typename T>
60Option<Error> _check_ready(const process::Future<T>& f)
61{
62 if (f.isPending()) {
63 return Error("is PENDING");
64 } else if (f.isDiscarded()) {
65 return Error("is DISCARDED");
66 } else if (f.isFailed()) {
67 return Error("is FAILED: " + f.failure());
68 } else {
69 CHECK(f.isReady());
70 return None();
71 }
72}
73
74
75template <typename T>

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected