Skip to content

Class

EventLoopGroupConnectionPool

Holds a collection of connection pools for each EventLoop on an EventLoopGroup.
final class EventLoopGroupConnectionPool<Source> where Source : ConnectionPoolSource

Overview

Connection pools are used to offset the overhead of creating new connections. Newly opened connections are returned back to the pool and can be re-used until they close.

New connections are created as needed until the maximum configured connection limit is reached. After the maximum is reached, no new connections will be created unless existing connections are closed.

let pool = EventLoopGroupConnectionPool(...)
pool.withConnection { conn in
    // use conn
}

Topics

Initializers

Instance Properties

Instance Methods

See Also

Legacy connection pools