10 typedef std::map<LHEProxy::ProxyID, std::weak_ptr<LHEProxy> >
ProxyMap;
13 static struct Sentinel {
23 return sentinel.instance;
29 std::scoped_lock scoped_lock(
mutex);
39 std::scoped_lock scoped_lock(
mutex);
41 std::shared_ptr<LHEProxy> proxy(
new LHEProxy(++nextProxyID));
51 std::scoped_lock scoped_lock(
mutex);
55 return std::shared_ptr<LHEProxy>();
57 ProxyMap::const_iterator
pos =
map->find(
id);
59 return std::shared_ptr<LHEProxy>();
61 return std::shared_ptr<LHEProxy>(
pos->second);