ssa: rely on runtime thread defer TLS

This commit is contained in:
Li Jie
2025-10-15 16:31:43 +08:00
parent 30bde9f6b5
commit cb173f91d0
5 changed files with 9 additions and 37 deletions

View File

@@ -29,6 +29,11 @@ func SetThreadDefer(head *Defer) {
deferTLS.Set(head)
}
// GetThreadDefer returns the current thread's defer chain head.
func GetThreadDefer() *Defer {
return deferTLS.Get()
}
// ClearThreadDefer resets the current thread's defer chain to nil.
func ClearThreadDefer() {
deferTLS.Clear()