ponyc icon indicating copy to clipboard operation
ponyc copied to clipboard

Incorrect information in the `ponysuspendthreshold` help string

Open SeanTAllen opened this issue 3 years ago • 5 comments

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.

SeanTAllen avatar Feb 02 '22 15:02 SeanTAllen

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 avatar Feb 15 '22 19:02 csos95

@csos95 would you like to handle the PR to fix this?

SeanTAllen avatar Feb 20 '22 03:02 SeanTAllen

Sure, I’ll get it done later today.

csos95 avatar Feb 20 '22 18:02 csos95

@csos95 Are you still handling this issue?

rhagenson avatar Aug 15 '22 22:08 rhagenson

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.

SeanTAllen avatar Aug 26 '22 18:08 SeanTAllen