Thread-safe map for context objects.
const Item * find(Key key) const
bool contains(Key key) const
auto acquireLock() const
Acquire the lock/mutex for unique access to the underlying map.
const auto & underlying() const noexcept
Get access to the underlying map. Use acquireLock before any operation.
Item * operator[](Key key)
Access or insert specified element.
Item * insert(Key key, std::unique_ptr< Item > &&item)
Inserts an element or assigns to the current element if the key already exists.