Added ConditionalLock.

Fixed a bug in ActionManager.
Fixed some bugs on UITableView and UITreeView.
Fixed a dead-lock un AutoCompleteModule.
This commit is contained in:
Martín Lucas Golini
2022-02-27 20:29:01 -03:00
parent a54da7d6da
commit 99110d6bef
10 changed files with 73 additions and 28 deletions

View File

@@ -445,10 +445,12 @@ static std::vector<std::string> fuzzyMatchSymbols( const AutoCompleteModule::Sym
void AutoCompleteModule::runUpdateSuggestions( const std::string& symbol,
const SymbolsList& symbols, UICodeEditor* editor ) {
Lock l( mLangSymbolsMutex );
Lock l2( mSuggestionsMutex );
mSuggestions = fuzzyMatchSymbols( symbols, symbol, mSuggestionsMaxVisible );
mSuggestionsEditor = editor;
{
Lock l( mLangSymbolsMutex );
Lock l2( mSuggestionsMutex );
mSuggestions = fuzzyMatchSymbols( symbols, symbol, mSuggestionsMaxVisible );
mSuggestionsEditor = editor;
}
editor->runOnMainThread( [editor] { editor->invalidateDraw(); } );
}