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 force garbage collection to happen synchronously when the request_limit is exceeded.
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 force garbage collection to happen synchronously when the request_limit is exceeded.
If synchronous=false, a background collection will be scheduled, but will wait until the system is idle.
Use synchronous=false for interactive systems, and synchronous=true for non-interactive batch processes.