Files
2026-06-01 12:46:52 +02:00

24 lines
303 B
C++

#pragma once
#include <map>
#include <toolkit/ILock.h>
class ThreadSafeIntMap
{
public:
ThreadSafeIntMap();
void Set( int nKey, int nValue );
void Remove( int nKey );
int Get( int nKey, int nDefault = 0 ) const;
private:
mutable XCriticalSection m_csMap;
std::map< int, int > m_map;
};