Trait glommio::SharesManager[][src]

pub trait SharesManager {
    fn shares(&self) -> usize;

    fn adjustment_period(&self) -> Duration { ... }
}
Expand description

The SharesManager allows the user to implement dynamic shares for a TaskQueue

In terms of behavior, a TaskQueue with static shares is the same as a SharesManager managed queue that always return the same value. However this is a bit more expensive to compute because it needs to be reevaluated constantly.

The difference is akin to a constant versus variable in your favorite programming language.

Required methods

The amount of shares that this TaskQueue should receive in the next adjustment period

Provided methods

How often to recompute the amount of shares for this TaskQueue

Trait Implementations

Formats the value using the given formatter. Read more

Implementors