Sha256: 7ab3fc29eb24d7ac472704784728060d15789b01d909127fc84c9fa0e56fcc38
Contents?: true
Size: 605 Bytes
Versions: 9
Compression:
Stored size: 605 Bytes
Contents
# frozen_string_literal: true module GrpcKit class RpcDispatcher class AutoTrimmer def initialize(pool, interval: 30) @pool = pool @interval = interval @running = false end def start! @running = true @thread = Thread.new do loop do unless @running GrpcKit.logger.debug('Stop AutoTrimer') break end @pool.trim sleep @interval end end end def stop @running = false @thread.wakeup end end end end
Version data entries
9 entries across 9 versions & 1 rubygems