mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 04:27:39 +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) {
|
if (word == null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user