Use an unordered map for the Realm coordinator cache
This commit is contained in:
parent
d6daa052e8
commit
7a0c83929f
|
@ -22,11 +22,13 @@
|
||||||
#include "external_commit_helper.hpp"
|
#include "external_commit_helper.hpp"
|
||||||
#include "object_store.hpp"
|
#include "object_store.hpp"
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
using namespace realm;
|
using namespace realm;
|
||||||
using namespace realm::_impl;
|
using namespace realm::_impl;
|
||||||
|
|
||||||
static std::mutex s_coordinator_mutex;
|
static std::mutex s_coordinator_mutex;
|
||||||
static std::map<std::string, std::weak_ptr<RealmCoordinator>> s_coordinators_per_path;
|
static std::unordered_map<std::string, std::weak_ptr<RealmCoordinator>> s_coordinators_per_path;
|
||||||
|
|
||||||
std::shared_ptr<RealmCoordinator> RealmCoordinator::get_coordinator(StringData path)
|
std::shared_ptr<RealmCoordinator> RealmCoordinator::get_coordinator(StringData path)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue