class Amber::Pipe::Compression::DeflaterPool

Overview

Keeps up to idle_limit compressors between responses. Safe to share across fibers and threads.

:nodoc:

Defined in:

amber/pipes/compression/deflater.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(level : Int32, idle_limit : Int32) #

[View source]

Instance Method Detail

def checkin(deflater : Deflater) : Nil #

Takes back deflater after its response ends. One that cannot be reset, or that does not fit, is freed now.


[View source]
def checkout : Deflater #

[View source]
def idle_count : Int32 #

How many compressors wait in the pool now.


[View source]
def idle_limit : Int32 #

def level : Int32 #