mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
also fixed the coalescing case where the connection may come from the pool, and should therefore be remmoved from there and selected/checked back in accordingly as a result
34 lines
954 B
Plaintext
34 lines
954 B
Plaintext
module HTTPX
|
|
class Pool
|
|
type resolver_manager = Resolver::Multi | Resolver::System
|
|
|
|
@options: Options
|
|
@resolvers: Hash[Class, Array[resolver_manager]]
|
|
@resolver_mtx: Thread::Mutex
|
|
@connections: Array[Connection]
|
|
@connection_mtx: Thread::Mutex
|
|
|
|
def pop_connection: () -> Connection?
|
|
|
|
def checkout_connection: (http_uri uri, Options options) -> Connection
|
|
|
|
def checkin_connection: (Connection connection, ?boolish delete) -> void
|
|
|
|
def checkout_mergeable_connection: (Connection connection) -> Connection?
|
|
|
|
def reset_resolvers: () -> void
|
|
|
|
def checkout_resolver: (Options options) -> resolver_manager
|
|
|
|
def checkin_resolver: (Resolver::Resolver resolver) -> void
|
|
|
|
private
|
|
|
|
def initialize: (Options options) -> void
|
|
|
|
def checkout_new_connection: (http_uri uri, Options options) -> Connection
|
|
|
|
def checkout_new_resolver: (Class resolver_type, Options options) -> resolver_manager
|
|
end
|
|
end
|