ponyc
ponyc copied to clipboard
Incorrect information in the `ponysuspendthreshold` help string
The help string states:
--ponysuspendthreshold
Amount of idle time before a scheduler thread suspends
itself to minimize resource consumption (max 1000 ms,
min 1 ms).
Defaults to 1 ms.
but the max isn't enforced.
Either the help string needs to be changed or we need to enforce a max. This is also settable via RuntimeOptions so that needs to be taken into consideration.
The value is stored in an unsigned 64 which is multipled by 1000000 to get a final "ticks" value so, we need to take overflow into account.
Instead of stating that the value given is the number of milliseconds to idle before a thread is suspended, maybe directly state that the value multiplied by one million is the number of ticks to idle before a thread is suspended and in parenthesis give an estimate of how many ticks are in a millisecond on some given hardware.
That way it's clear to the user that this isn't a constant amount of time and that it's something they need to be aware of if used on different hardware.
@csos95 would you like to handle the PR to fix this?
Sure, I’ll get it done later today.
@csos95 Are you still handling this issue?
I think we can assume that this is available for anyone to work on at this point and that @csos95 has moved on to other things.