#3801·gofr

Graceful stop 确定不发生- 在边缘前: 服务器已丢失关闭( 无检查- 已启动) + cron Stop( ) 没有工作加入

作者: akshat-kumar-singhal创建于 2026年7月28日更新于 2026年9月2日

Follow-up from the review on #3800. Two lifecycle bugs share one shape: a "stop" that establishes no happens-before edge with the thing it is stopping. #3800 fixes the memory-safety half (the -race-visible data race on srv); these two ordering bugs remain and are not visible to -race.

1. Lost shutdown: srv == nil doubles as "not started yet"

run.go starts the shutdown handler before the servers: