Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The value of 0 is an invalid value for shares. It is also dangerously invalid, in the sense that due to way we calculate the cost of requests it will add a NaN to the accumulator that will stay there forever - even if the shares happen to be adjusted later. Although we could just document it and expect the caller to verify that, or even throw an exception, we can just as easily enforce in the fair_queue that the minimum shares should be 1 instead of 0. Classes tend to be well behaved with respect to its shares, which is why we have never really felt the need for it. But once we start adjusting shares that is an easy mistake to make. Signed-off-by: Glauber Costa <[email protected]> Message-Id: <[email protected]>
- Loading branch information