You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 2, 2018. It is now read-only.
I am seeing issues because of this. For example, the following code:
Will cause problems at the call to unwrap at https://github.com/tokio-rs/tokio-timer/blob/master/src/worker.rs#L56 since https://github.com/tokio-rs/tokio-timer/blob/master/src/worker.rs#L52 won't protect us if capacity is not a power of two, since we will end up increasing capacity at https://github.com/tokio-rs/tokio-timer/blob/master/src/mpmc.rs#L32 which then causes the outer call to unwrap to fail.
This code where channel capacity is greater than max capacity also causes a different issue:
The error occurs at https://github.com/tokio-rs/tokio-timer/blob/master/src/wheel.rs#L109 due to a subtraction underflow (because by the time https://github.com/tokio-rs/tokio-timer/blob/master/src/wheel.rs#L107 is triggered, we were already past self.max_capacity since initial capacity was derived from a channel capacity that was greater than max capacity).
I don't mind submitting a PR, but wanted to check first what would be the best course of action, as there are a couple ways to fix these two issues.
The text was updated successfully, but these errors were encountered: