DoxigAlpha

ConnectionPool

A Least-Recently-Used cache of open connections to be reused.

Fields of this type

Fields

#
mutex:std.Thread.Mutex
= .{}
used:std.DoublyLinkedList
Open connections that are currently in use.
free:std.DoublyLinkedList
Open connections that are not currently in use.
free_len:usize
= 0
free_size:usize
= 32

The criteria for a connection to be considered a match.

Types

#
Criteria
The criteria for a connection to be considered a match.

Finds and acquires a connection from the connection pool matching the criteria.

Functions

#
findConnection
Finds and acquires a connection from the connection pool matching the criteria.
acquireUnsafe
Acquires an existing connection from the connection pool.
acquire
Acquires an existing connection from the connection pool.
release
Tries to release a connection back to the connection pool.
addUsed
Adds a newly created node to the pool of used connections.
resize
Resizes the connection pool.
deinit
Frees the connection pool and closes all connections within.