コード例 #1
0
ファイル: synced_containers.hpp プロジェクト: wheeland/pgasus
	bool try_get(T* &result) {
		if (sem_trywait(&_count) == 0) {
			std::lock_guard<Lock> l(_lock);
		
			result = _data.back();
			_data.pop_back();
			return true;
		}
		return false;
	}