pub fn addUsed(pool: *ConnectionPool, io: Io, connection: *Connection) Io.Cancelable!void pool: *ConnectionPoolio: Ioconnection: *Connection151
152
153
154
155
156 pub fn addUsed(pool: *ConnectionPool, io: Io, connection: *Connection) Io.Cancelable!void {
try pool.mutex.lock(io);
defer pool.mutex.unlock(io);
pool.used.append(&connection.pool_node);
}
Adds a newly created node to the pool of used connections. This function is threadsafe.