docs(lua): 更正 ScheduledTask.Timeout 注释 —— 超时由抛弃 generation 实现,非 Lua 指令级中断

This commit is contained in:
JianFeeeee
2026-10-11 12:14:49 +08:00
parent b6148e6f79
commit 57fada3b0d

View File

@ -53,8 +53,10 @@ type ScheduledTask struct {
// many replicas) do not all hit the same upstream at :00.
Jitter int `json:"jitter,omitempty"`
// Timeout, in seconds, bounds one execution. 0 uses defaultTaskTimeout.
// A task that exceeds it is interrupted at the Lua instruction level — the
// only way to stop a runaway script on the C stack.
// NOTE: a running Lua call CANNOT be interrupted in this LuaJIT build (see
// the capability note in checkWedged). The timeout is therefore enforced at
// the generation level — a task that overruns wedgedAfter has its whole VM
// abandoned — not by stopping the script mid-instruction.
Timeout int `json:"timeout,omitempty"`
}