| 74 | |
| 75 | template <typename T> |
| 76 | Option<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 | |
| 91 | template <typename T> |
nothing calls this directly
no test coverage detected