Skip to main content

One post tagged with "godis"

View All Tags

godis源码阅读

· 33 min read
ayanami

tcp

echo

一个优雅超时关闭的方法

// WaitWithTimeout blocks until the WaitGroup counter is zero or timeout
// returns true if timeout
func (w *Wait) WaitWithTimeout(timeout time.Duration) bool {
c := make(chan struct{}, 1)
go func() {
defer close(c)