Pony struct for the Pony runtime options C struct that can be used to override the Pony runtime defaults via code compiled into the program.
The way this is done is by adding the following function to your
fun @runtime_override_defaults(rto: RuntimeOptions) =>
and then overriding the fields of
RuntimeOptions instance) as
NOTE: Command line arguments still any values set via
The following example overrides the
--ponyhelp argument to default it to
true instead of
false causing the compiled program to always display
the Pony runtime help:
actor Main new create(env: Env) => env.out.print("Hello, world.") fun @runtime_override_defaults(rto: RuntimeOptions) => rto.ponyhelp = true
struct ref RuntimeOptions
new iso create() : RuntimeOptions iso^
- RuntimeOptions iso^
Use N scheduler threads. Defaults to the number of cores (not hyperthreads) available. This can't be larger than the number of cores available.
Minimum number of active scheduler threads allowed. Defaults to 0, meaning that all scheduler threads are allowed to be suspended when no work is available. This can't be larger than --ponymaxthreads if provided, or the physical cores available.
Don't scale down the scheduler threads. See --ponymaxthreads on how to specify the number of threads explicitly. Can't be used with --ponyminthreads.
Amount of idle time before a scheduler thread suspends itself to minimize resource consumption (max 1000 ms, min 1 ms). Defaults to 1 ms.
Run cycle detection every N ms (max 1000 ms, min 10 ms). Defaults to 100 ms.
Defer garbage collection until an actor is using at least 2^N bytes. Defaults to 2^14.
After GC, an actor will next be GC'd at a heap memory usage N times its current value. This is a floating point value. Defaults to 2.0.
Do not yield the CPU when no work is available.
Do not send block messages to the cycle detector.
Pin scheduler threads to CPU cores. The ASIO thread can also be pinned if
--ponypinasio is set.
Pin the ASIO thread to a CPU the way scheduler threads are pinned to CPUs.
--ponypin to be set to have any effect.
Print the version of the compiler and exit.
Print the runtime usage options and exit.