Skip to content

Commit

Permalink
Merge pull request #20 from wangxx2026/master
Browse files Browse the repository at this point in the history
add ci lock func
  • Loading branch information
zhiqiangxu authored Jun 19, 2020
2 parents 957f05d + 38a7f91 commit d8cdc32
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions serveconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ func (ci *ConnectionInfo) NotifyWhenClose(f func()) {
ci.l.Unlock()
}

// Begin a connetction lock
func (ci *ConnectionInfo) Lock() {
ci.l.Lock()
}

// Release a connection lock
func (ci *ConnectionInfo) UnLock() {
ci.l.Unlock()
}

// Server returns the server
func (sc *serveconn) Server() *Server {
return sc.server
Expand Down

0 comments on commit d8cdc32

Please sign in to comment.