| 24 | |
| 25 | template <class KeyType> |
| 26 | Exec_CompilerTaskSyncBase::ClaimResult |
| 27 | Exec_CompilerTaskSync<KeyType>::Claim( |
| 28 | const KeyType &key, |
| 29 | Exec_CompilationTask *task) |
| 30 | { |
| 31 | // Add the key to the map. If another task got to claiming it first, it's |
| 32 | // expected and safe for the key to already have an waitlist. |
| 33 | const auto &[iterator, inserted] = _waitlists.emplace( |
| 34 | std::piecewise_construct, |
| 35 | std::forward_as_tuple(key), |
| 36 | std::forward_as_tuple()); |
| 37 | _Waitlist *const waitlist = &iterator->second; |
| 38 | |
| 39 | return _Claim(waitlist, task); |
| 40 | } |
| 41 | |
| 42 | template <class KeyType> |
| 43 | Exec_CompilerTaskSyncBase::WaitResult |
no test coverage detected