6 releases (3 breaking)

0.4.1 Jul 22, 2020
0.4.0 Jul 22, 2020
0.3.1 Jul 22, 2020
0.2.0 Jul 18, 2020
0.1.0 Jul 18, 2020

#753 in Memory management

MIT license

14KB
284 lines

ika

rusty object pool
MIT


lib.rs:

welcome to the ika pool

use ika::Pool;

fn main() {
   let mut str_pool: Pool<String> = Pool::new(10);
   str_pool.spawn_some(5)
           .drain(..)
           .enumerate()
           .for_each(| (i, r) | {
               r.push_str(&i.to_string());
               r.push_str(" hallo");
           });

   let ok = str_pool.detach(2);

   str_pool.attach(2, "wowo".to_owned());
}

No runtime deps