# TaskPool ```rust= struct TaskPool<T> { queue: Queue<T>, consumers: SomeSetOfInFlightTasks, } pub fn new<T>( channel_cap: usize, consumers: usize, handler: Fn(T) -> impl Future<Item = ()> ) -> (Tx, TaskPool<T>) { } let (tx, pool_handle) = task_pool::new( 1024, 10, |msg| async { println!("Got message {:?}", msg); } ); tx.send("hello"); ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up