github.com\eclipse\[email protected]\token.go
// WaitTimeout implements the Token WaitTimeout method. func (b *baseToken) WaitTimeout(d time.Duration) bool { timer := time.NewTimer(d) select { case <-b.complete: if !timer.Stop() { <-timer.C } return true case <-timer.C: }return false }
翻译
搜索
复制
标签:false,计时器,time,超时,select,WaitTimeout From: https://www.cnblogs.com/papering/p/17832169.html