mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 04:27:39 +00:00
[fix][chat] Fix the issue with the order of parallel execution in the map. (#1976)
This commit is contained in:
@@ -73,11 +73,15 @@ public abstract class BaseMatchStrategy<T extends MapResult> implements MatchStr
|
|||||||
protected void executeTasks(List<Callable<Void>> tasks) {
|
protected void executeTasks(List<Callable<Void>> tasks) {
|
||||||
try {
|
try {
|
||||||
threadPoolConfig.getMapExecutor().invokeAll(tasks);
|
threadPoolConfig.getMapExecutor().invokeAll(tasks);
|
||||||
} catch (InterruptedException e) {
|
for (Callable<Void> future : tasks) {
|
||||||
|
future.call();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
throw new RuntimeException("Task execution interrupted", e);
|
throw new RuntimeException("Task execution interrupted", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getThreshold(Double threshold, Double minThreshold, MapModeEnum mapModeEnum) {
|
public double getThreshold(Double threshold, Double minThreshold, MapModeEnum mapModeEnum) {
|
||||||
if (MapModeEnum.STRICT.equals(mapModeEnum)) {
|
if (MapModeEnum.STRICT.equals(mapModeEnum)) {
|
||||||
return 1.0d;
|
return 1.0d;
|
||||||
|
|||||||
Reference in New Issue
Block a user