예제 #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();
		}
	}
예제 #2
0
파일: pulley.cpp 프로젝트: arpa2/steamworks
	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;
	}