10#ifndef liblldb_ThreadSafeDenseSet_h_
11#define liblldb_ThreadSafeDenseSet_h_
15#include "llvm/ADT/DenseSet.h"
20template <
typename _ElementType,
typename _MutexType = std::mutex>
30 std::lock_guard<_MutexType> guard(
m_mutex);
31 return m_set.insert(e).second;
35 std::lock_guard<_MutexType> guard(
m_mutex);
40 std::lock_guard<_MutexType> guard(
m_mutex);
41 return (
m_set.count(e) > 0);
45 std::lock_guard<_MutexType> guard(
m_mutex);
llvm::DenseSet< _ElementType > LLVMSetType
void Erase(_ElementType e)
bool Insert(_ElementType e)
Returns true if e was not in the set yet.
ThreadSafeDenseSet(unsigned set_initial_capacity=0)
bool Lookup(_ElementType e)
A class that represents a running process on the host machine.