Thanks to visit codestin.com
Credit goes to github.com

Skip to content

请问下池子为什么每次要lock呢 #19

@XxYyKk

Description

@XxYyKk

请问下 pool 为什么每次要 lock ,是什么考虑呢

// getConns 获取所有连接
func (c *channelPool) getConns() chan *idleConn {
c.mu.Lock()
conns := c.conns
c.mu.Unlock()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions