Skip to content

common/signal/timer.go: Refator to use sync.Once#5052

Merged
RPRX merged 5 commits intomainfrom
timer
Aug 27, 2025
Merged

common/signal/timer.go: Refator to use sync.Once#5052
RPRX merged 5 commits intomainfrom
timer

Conversation

@Fangliding
Copy link
Member

fix #5051
移除了烦人难懂的空指针检查 改为显式的once操作 finish() 无论如何只执行一次
settimeout在once被消耗后不再执行操作
mutex匿名结构体被重新修改为未导出字段 mutex相关功能不应该允许外部调用
so

@patterniha

This comment was marked as resolved.

@RPRX RPRX changed the title refator timer to use sync.Once common/signal/timer.go: Refator to use sync.Once Aug 27, 2025
@RPRX RPRX merged commit 2ee372e into main Aug 27, 2025
78 checks passed
@RPRX RPRX deleted the timer branch August 27, 2025 09:33
it2konst pushed a commit to it2konst/gametunnel-core that referenced this pull request Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

signal泄露问题

3 participants