| 158 | // Invoked when a notifier is set. |
| 159 | template <typename T> |
| 160 | static void notified( |
| 161 | Owned<Promise<T>> promise, |
| 162 | const lambda::function<Future<T>()>& callback) |
| 163 | { |
| 164 | if (promise->future().hasDiscard()) { |
| 165 | // The user has shown the intention to discard this callback |
| 166 | // (i.e., by calling future.discard()). As a result, we will |
| 167 | // just skip this callback. |
| 168 | promise->discard(); |
| 169 | } else { |
| 170 | promise->associate(callback()); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | Future<Nothing> last; |
| 175 | }; |
nothing calls this directly
no test coverage detected