class
IdleGC::Request
- IdleGC::Request
- Reference
- Object
Defined in:
idle-gc/request.crConstant Summary
-
DEFAULT_REQUEST_LIMIT =
1_u64 -
DEFAULT_SYNCHRONOUS =
false
Class Method Summary
- .request(incr : UInt64 = 1) : Bool
-
.request_count : UInt64
Return the current request count.
-
.request_limit : UInt64
Return the current request limit.
-
.request_limit=(v : UInt64) : Nil
Set the request limit.
-
.synchronous : Bool
Returns false (default) if garbage collection happens in the background.
-
.synchronous=(v : Bool) : Nil
Set synchronous=true to try collection synchronously when request_limit is reached.
Class Method Detail
Set the request limit.
(Merely setting the request limit will not cause garbage collection to fire.)
Returns false (default) if garbage collection happens in the background. Returns true if garbage collection happens synchronously.
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.