mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
(improvement)(chat) Fix the thread safety issue in parallel insertion of nature. (#603)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user