X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/03b35a9a1bd1f583e32b27d260b223a0989d6c75..06282fd37814c4a9d53bca089b048709b368f5b3:/handle.cc?ds=sidebyside diff --git a/handle.cc b/handle.cc index 926cb59..20438f9 100644 --- a/handle.cc +++ b/handle.cc @@ -12,6 +12,16 @@ public: static std::mutex mgr_mutex; static std::map> hmap; +void handle::shutdown() { + lock ml(mgr_mutex); + LOG_NONMEMBER << "Shutting down handle manager"; + for (auto p : hmap) { + p.second->valid = false; + LOG_NONMEMBER << "cl " << p.first << " refcnt " << p.second.use_count(); + } + hmap.clear(); +} + handle::handle(const string & destination) : destination_(destination) { lock ml(mgr_mutex); h = hmap[destination];