1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#![feature(alloc, heap_api)] #![feature(arc_counts)] //! `VeryFast` is a collection of useful tools needed mostly by game developers. //! It is designed to work well in multi threaded contexts. //! //! #Examples //! ``` //! use veryfast::pool::{Pool, Object}; //! //! let pool = Pool::new(true, 1000); //! //! let var1 = pool.add(15i32); //! let mut var2 = pool.add(7); //! *var2 = *var1; //! assert_eq!(*var1, *var2); //! //! let mut vec = Vec::new(); //! for i in 0..10 { //! vec.push(pool.add(i)); //! } //! for i in &vec { //! print!("{} ", **i); //! } //! ``` //! //! #Nightly Requirements: //! Nightly is required for the next features: //! //! - `#[feature(alloc)]`: Custom allocation //! //! - `#[feature(heap_api)]`: Custom allocation extern crate alloc; extern crate crossbeam; pub mod pool; // possible future crates // // scoped_threadpool = "*" // num_cpus = "*" // futures = { git = "https://github.com/alexcrichton/futures-rs" }