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

Method putConnection

IceFireDB-SQLite/pkg/mysql/client/pool.go:177–191  ·  view source on GitHub ↗
(connection Connection)

Source from the content-addressed store, hash-verified

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

Callers 2

PutConnMethod · 0.95
recheckConnectionsMethod · 0.95

Calls 1

putConnectionUnsafeMethod · 0.95

Tested by

no test coverage detected