| 42 | |
| 43 | template <typename T> |
| 44 | Option<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 | |
| 59 | template <typename T> |
nothing calls this directly
no test coverage detected