9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +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 { public enum PathfindTaskRejectPolicy {
FLUSH_ALL, FLUSH_ALL,
CALLER_RUNS, CALLER_RUNS;
DISCARD;
public static PathfindTaskRejectPolicy fromString(String policy) { public static PathfindTaskRejectPolicy fromString(String policy) {
try { try {

View File

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