MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / putConnection

Method putConnection

IceFireDB-SQLProxy/pkg/mysql/client/pool.go:179–193  ·  view source on GitHub ↗
(connection Connection)

Source from the content-addressed store, hash-verified

177}
178
179func (pool *Pool) putConnection(connection Connection) {
180 pool.synchro.Lock()
181 defer pool.synchro.Unlock()
182
183 // If someone is already waiting for a connection, then we return it to him
184 select {
185 case pool.readyConnection <- connection:
186 return
187 default:
188 }
189
190 // Nobody needs this connection
191
192 pool.putConnectionUnsafe(connection)
193}
194
195func (pool *Pool) nowTs() Timestamp {
196 return Timestamp(time.Now().Unix())

Callers 2

PutConnMethod · 0.95
recheckConnectionsMethod · 0.95

Calls 1

putConnectionUnsafeMethod · 0.95

Tested by

no test coverage detected