inline void ObservableSettings::enableUpdates() { boost::lock_guard<boost::mutex> lock(mutex_); // if there are outstanding deferred updates, do the notification updatesType_ = UpdatesEnabled; if (deferredObservers_.size()) { bool successful = true; std::string errMsg; for (iterator i=deferredObservers_.begin(); i!=deferredObservers_.end(); ++i) { try { const ext::shared_ptr<Observer::Proxy> proxy = i->lock(); if (proxy) proxy->update(); } catch (std::exception& e) { successful = false; errMsg = e.what(); } catch (...) { successful = false; } } deferredObservers_.clear(); QL_ENSURE(successful, "could not notify one or more observers: " << errMsg); } }
size_type size () const { return m_set.size (); }
//-----------------------------------------------------------------// handle_type size() const { return current_ - 1 - erase_set_.size(); }