<pre>
代码库:https://github.com/fatih/pool.git
文件:channel.go
代码:
func (c *channelPool) getConnsAndFactory() (chan net.Conn, Factory) {
c.mu.RLock()
conns := c.conns
factory := c.factory
c.mu.RUnlock()
return conns, factory
}
</pre>
有疑问加站长微信联系(非本文作者)