| 15 | } |
| 16 | |
| 17 | std::unique_ptr<FrozenDataSource> DataSourceStorage::GetDataSource() |
| 18 | { |
| 19 | std::lock_guard<std::mutex> lock(m_mutex); |
| 20 | CHECK(!m_freeDataSources.empty(), ()); |
| 21 | std::unique_ptr<FrozenDataSource> front = std::move(m_freeDataSources.front()); |
| 22 | m_freeDataSources.pop_front(); |
| 23 | return front; |
| 24 | } |
| 25 | } // namespace routes_builder |
| 26 | } // namespace routing |