| 175 | } |
| 176 | |
| 177 | bool GetResult(vtkTypeUInt32 key, vtkSmartPointer<vtkUnsignedCharArray>& data) const |
| 178 | { |
| 179 | std::unique_lock<std::mutex> lock(this->ResultsMutex); |
| 180 | auto iter = this->Results.find(key); |
| 181 | if (iter == this->Results.end()) |
| 182 | { |
| 183 | return false; |
| 184 | } |
| 185 | |
| 186 | const auto& resultsPair = iter->second; |
| 187 | data = resultsPair.second; |
| 188 | // return true if this is the latest result for this key. |
| 189 | return (resultsPair.first == this->LastTimeStamp.at(key)); |
| 190 | } |
| 191 | |
| 192 | void Flush(vtkTypeUInt32 key) |
| 193 | { |
no test coverage detected