chore: rebuild SetupContextForConn with context.AfterFunc

This commit is contained in:
wwqgtxx
2025-04-10 01:16:54 +08:00
parent e8af058694
commit bfd06ebad0
5 changed files with 166 additions and 18 deletions

View File

@@ -0,0 +1,9 @@
//go:build go1.21
package contextutils
import "context"
func AfterFunc(ctx context.Context, f func()) (stop func() bool) {
return context.AfterFunc(ctx, f)
}