9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00

[ci skip] Remove DISCARD reject policy

This commit is contained in:
HaHaWTH
2025-08-28 10:10:53 +08:00
parent ee67dcbc7f
commit 9b1b165882
2 changed files with 3 additions and 6 deletions

View File

@@ -6,8 +6,7 @@ import java.util.Locale;
public enum PathfindTaskRejectPolicy {
FLUSH_ALL,
CALLER_RUNS,
DISCARD;
CALLER_RUNS;
public static PathfindTaskRejectPolicy fromString(String policy) {
try {

View File

@@ -23,13 +23,11 @@ public class AsyncPathfinding extends ConfigModules {
config.addCommentRegionBased(getBasePath() + ".reject-policy", """
The policy to use when the queue is full and a new task is submitted.
FLUSH_ALL: All pending tasks will be run on server thread.
CALLER_RUNS: Newly submitted task will be run on server thread.
DISCARD: Newly submitted task will be dropped directly.""",
CALLER_RUNS: Newly submitted task will be run on server thread.""",
"""
当队列满时, 新提交的任务将使用以下策略处理.
FLUSH_ALL: 所有等待中的任务都将在主线程上运行.
CALLER_RUNS: 新提交的任务将在主线程上运行.
DISCARD: 新提交的任务会被直接丢弃."""
CALLER_RUNS: 新提交的任务将在主线程上运行."""
);
if (asyncPathfindingInitialized) {
config.getConfigSection(getBasePath());