Skip to content

关于.Unlock 提个问题,想了解一下实现 #35

Description

@seifeHu

Put(conn interface{}) 这方法里

c.mu.Lock()后为什么不直接
defer c.mu.Unlock()

而是各个select 分支上再 c.mu.Unlock()
有什么特殊的考虑吗?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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