Skip to content

loyd/weighted-select

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

weighted-select

Usage:

use weighted_select::{self, IncompleteSelect};

let select = weighted_select::new()
    .append(fetch_from_a, 5)
    .append(fetch_from_b, 2)
    .append(fetch_from_c, 3)
    .build();

It produces a stream that combines three underlying streams (fetch_from_*) and polls them according to their weights (5, 2, 3). Each stream will be polled at most weight times consecutively.

About

futures::stream::Select with weights

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages