Closed tontinton closed 12 months ago
max_expected_runtime
is passed by the reactor, because the time may be different for different task queues.
The threshold()
default implementation on line 65 seems to be the thing that's wrong, and it should be returning just 10ms.
You don't think the stall detector implementer should decide whether he wants a stall detection to happen even sooner than max_expected_runtime
? I see it as a legit use case.
If not, yeah I'll simply fix the default stall detector to return 10ms.
No, if the task queue has a quota to run for x ms, running for less than that is not a stall, technically speaking.
Got it, fixed
The final expected runtime, is supposed to be whatever we get from the
threshold
call.If we add the
max_expected_time
again, it will be wrong.Whoever CRs this, I have a question: Do we want the
threshold
method to return the time to add tomax_expected_time
or do we want the user to completely control the amount, like I did in this PR?I think it is better to let the user always control, he can decide whether to use
max_expected_time
or not.