class

IdleGC::Request

Inherits Reference < Object

Constants

DEFAULT_REQUEST_LIMIT = 1_u64
DEFAULT_SYNCHRONOUS = false

Class methods

request(incr : UInt64 = 1) : Bool
Source
request_count

Return the current request count.

Source
request_limit

Return the current request limit.

Source
request_limit=(v : UInt64) : Nil

Set the request limit.

(Merely setting the request limit will not cause garbage collection to fire.)

Source
synchronous

Returns false (default) if garbage collection happens in the background. Returns true if garbage collection happens synchronously.

Source
synchronous=(v : Bool) : Nil

Set synchronous=true to try collection synchronously when request_limit is reached. Collection still requires min_bytes_since_gc allocations.

If synchronous=false, a background collection will be scheduled, but will check for tracked activity before collecting.

Use synchronous=false for interactive systems, and synchronous=true for non-interactive batch processes.

Source