(improvement)(chat) Fix the thread safety issue in parallel insertion of nature. (#603)

This commit is contained in:
lexluo09
2024-01-08 17:08:38 +08:00
committed by GitHub
parent b55b4c130e
commit 8eef11f342

View File

@@ -353,7 +353,7 @@ public class MultiCustomDictionary extends DynamicCustomDictionary {
}
public boolean insert(String word, String natureWithFrequency) {
public synchronized boolean insert(String word, String natureWithFrequency) {
if (word == null) {
return false;
} else {