Esempio n. 1
0
	void run()
	{
		while(keeprunning)
		{
			std::lock_guard lg(poolmutex);
			pool.remove_if([](std::shared_ptr<KinectFrameWriter> ptr){ ptr->writebacktofile.valid(); });
			std::this_thread::yield();
		}
	}
Esempio n. 2
0
	int remove_follower(const std::string& base, const std::string& filter)
	{
		SteamWorks::Logging::Logger& log = SteamWorks::Logging::getLogger("steamworks.pulley");
		log.debugStream() << "Looking for SyncRepl base=" << base << " filter=" << filter;

#ifndef NDEBUG
		for(auto it = m_following.cbegin(); it != m_following.cend(); it++)
		{
			auto& f = *it;
			log.debugStream() << "  .. SyncRepl @" << (void *)f.get() << " base=" << f->base() << " filter=" << f->filter();
		}
#endif

		m_following.remove_if([&](const SyncReplUPtr& f) { return (f->base() == base) && (f->filter() == filter); });
		return 0;
	}