| 58 | |
| 59 | template <class KeyType> |
| 60 | void |
| 61 | Exec_CompilerTaskSync<KeyType>::MarkDone(const KeyType &key) |
| 62 | { |
| 63 | // Get the waitlist for the key. If previously claimed or waited on, the |
| 64 | // waitlist will exist. If not, we create a new waitlist in case a future |
| 65 | // caller attempts to wait on this key. |
| 66 | const auto &[iterator, inserted] = _waitlists.emplace( |
| 67 | std::piecewise_construct, |
| 68 | std::forward_as_tuple(key), |
| 69 | std::forward_as_tuple()); |
| 70 | _Waitlist *const waitlist = &iterator->second; |
| 71 | |
| 72 | // We expect the waitlist to not already be marked done. |
| 73 | const bool wasNotDone = _MarkDone(waitlist); |
| 74 | TF_VERIFY(wasNotDone); |
| 75 | } |
| 76 | |
| 77 | template <class KeyType> |
| 78 | void |
no test coverage detected