| 106 | |
| 107 | template <typename T> |
| 108 | Option<Error> _check_abandoned(const process::Future<T>& f) |
| 109 | { |
| 110 | if (f.isReady()) { |
| 111 | return Some("is READY"); |
| 112 | } else if (f.isDiscarded()) { |
| 113 | return Some("is DISCARDED"); |
| 114 | } else if (f.isFailed()) { |
| 115 | return Some("is FAILED: " + f.failure()); |
| 116 | } else if (!f.isAbandoned()) { |
| 117 | return Some("is not abandoned"); |
| 118 | } |
| 119 | return None(); |
| 120 | } |
| 121 | |
| 122 | // TODO(dhamon): CHECK_NPENDING, CHECK_NREADY, etc. |
| 123 |
nothing calls this directly
no test coverage detected