Method

PgsqlConnectionPoolacquire

Declaration

DexFuture*
pgsql_connection_pool_acquire (
  PgsqlConnectionPool* self
)

Description

Acquires a connection from the pool.

This may queue until a connection is available if there are no connections currently available and the max number has been created.

The returned connection must be released back to the pool using pgsql_connection_pool_release() when finished.

Return value

Type: DexFuture

A DexFuture that resolves to a PgsqlConnection or rejects with error.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.