class IdleGC::Timer

Defined in:

idle-gc/timer.cr

Constant Summary

DEFAULT_FORCE_GC_PERIOD = 2.minutes
DEFAULT_POLL_INTERVAL = 10.seconds

Class Method Summary

Class Method Detail

def self.force_gc_period=(v : ::Time::Span | Nil) : Nil #

Force an allocation-gated collection even when busy. Defaults to 2 minutes. Set to nil before starting to disable forced collections.


[View source]
def self.poll_interval=(v : ::Time::Span) : Nil #

Set the polling interval before starting. Defaults to 10 seconds.


[View source]
def self.running? : Bool #

[View source]
def self.start : Nil #

Start one periodic polling fiber for the lifetime of the process.


[View source]