A set of linked lists of connections that can be reused.
Functions
fn acquire(pool: *ConnectionPool, node: *Node) void
Acquires an existing connection from the connection pool. This function is threa…
Acquires an existing connection from the connection pool. This function is threadsafe.
fn acquireUnsafe(pool: *ConnectionPool, node: *Node) void
Acquires an existing connection from the connection pool. This function is not t…
Acquires an existing connection from the connection pool. This function is not threadsafe.
fn addUsed(pool: *ConnectionPool, node: *Node) void
Adds a newly created node to the pool of used connections. This function is thre…
Adds a newly created node to the pool of used connections. This function is threadsafe.
fn findConnection(pool: *ConnectionPool, criteria: Criteria) ?*Node
Finds and acquires a connection from the connection pool matching the criteria. …
Finds and acquires a connection from the connection pool matching the criteria. This function is threadsafe. If no connection is found, null is returned.
fn release(pool: *ConnectionPool, client: *Client, node: *Node) void
Tries to release a connection back to the connection pool. This function is thre…
Tries to release a connection back to the connection pool. This function is threadsafe. If the connection is marked as closing, it will be closed instead.