We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37bc13e commit 26be87fCopy full SHA for 26be87f
internal/runtime/executor.go
@@ -262,8 +262,8 @@ func (e *Executor) worker() {
262
func (e *Executor) runTask(task task) error {
263
ctx := task.ctx
264
if e.taskTimeout > 0 {
265
- timeoutCtx, cancel := context.WithTimeout(ctx, e.taskTimeout)
266
- defer cancel()
+ timeoutCtx, _ := context.WithTimeout(ctx, e.taskTimeout)
+ // TODO: 这里不能主动取消,因为超时会自动触发上下文取消,下游其实有异步处理依赖。除非保证下游的所有异步都直接withoutCancel。
267
ctx = timeoutCtx
268
}
269
ctx, span := otel.StartNamed(ctx, "runtime.executor.run")
0 commit comments