Refactor turn lane passing
This commit is contained in:
committed by
Patrick Niklaus
parent
4f13208ce8
commit
37b8d3acd4
@@ -27,6 +27,23 @@ struct ConcurrentIDMap
|
||||
std::unordered_map<KeyType, ValueType, HashType> data;
|
||||
mutable UpgradableMutex mutex;
|
||||
|
||||
ConcurrentIDMap() = default;
|
||||
ConcurrentIDMap(ConcurrentIDMap &&other)
|
||||
{
|
||||
ScopedWriterLock other_lock{other.mutex};
|
||||
ScopedWriterLock lock{mutex};
|
||||
|
||||
data = std::move(other.data);
|
||||
}
|
||||
ConcurrentIDMap& operator=(ConcurrentIDMap &&other)
|
||||
{
|
||||
ScopedWriterLock other_lock{other.mutex};
|
||||
ScopedWriterLock lock{mutex};
|
||||
|
||||
data = std::move(other.data);
|
||||
return *this;
|
||||
}
|
||||
|
||||
const ValueType ConcurrentFindOrAdd(const KeyType &key)
|
||||
{
|
||||
{
|
||||
@@ -54,4 +71,4 @@ struct ConcurrentIDMap
|
||||
} // util
|
||||
} // osrm
|
||||
|
||||
#endif // CONCURRENT_ID_MAP_HPP
|
||||
#endif // CONCURRENT_ID_MAP_HPP
|
||||
|
||||
Reference in New Issue
Block a user