Don't use recursive mutex for nicknames anymore
This commit is contained in:
parent
a5246a6df7
commit
26ba8e1938
|
@ -298,10 +298,10 @@ std::vector<wxString> LIB_TABLE::GetLogicalLibs()
|
||||||
|
|
||||||
bool LIB_TABLE::InsertRow( LIB_TABLE_ROW* aRow, bool doReplace )
|
bool LIB_TABLE::InsertRow( LIB_TABLE_ROW* aRow, bool doReplace )
|
||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> lock( m_nickIndexMutex );
|
|
||||||
|
|
||||||
ensureIndex();
|
ensureIndex();
|
||||||
|
|
||||||
|
std::lock_guard<std::mutex> lock( m_nickIndexMutex );
|
||||||
|
|
||||||
INDEX_CITER it = nickIndex.find( aRow->GetNickName() );
|
INDEX_CITER it = nickIndex.find( aRow->GetNickName() );
|
||||||
|
|
||||||
aRow->SetParent( this );
|
aRow->SetParent( this );
|
||||||
|
|
|
@ -340,7 +340,7 @@ public:
|
||||||
/// Delete all rows.
|
/// Delete all rows.
|
||||||
void Clear()
|
void Clear()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> lock( m_nickIndexMutex );
|
std::lock_guard<std::mutex> lock( m_nickIndexMutex );
|
||||||
|
|
||||||
rows.clear();
|
rows.clear();
|
||||||
nickIndex.clear();
|
nickIndex.clear();
|
||||||
|
@ -525,7 +525,7 @@ protected:
|
||||||
|
|
||||||
void reindex()
|
void reindex()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::recursive_mutex> lock( m_nickIndexMutex );
|
std::lock_guard<std::mutex> lock( m_nickIndexMutex );
|
||||||
|
|
||||||
nickIndex.clear();
|
nickIndex.clear();
|
||||||
|
|
||||||
|
@ -561,7 +561,7 @@ protected:
|
||||||
LIB_TABLE* fallBack;
|
LIB_TABLE* fallBack;
|
||||||
|
|
||||||
/// Mutex to protect access to the nickIndex variable
|
/// Mutex to protect access to the nickIndex variable
|
||||||
mutable std::recursive_mutex m_nickIndexMutex;
|
mutable std::mutex m_nickIndexMutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _LIB_TABLE_BASE_H_
|
#endif // _LIB_TABLE_BASE_H_
|
||||||
|
|
Loading…
Reference in New Issue