pub fn new(manager: impl Manager<T, E> + Send + Sync + 'static, max_size: usize) -> Pool<T, E> {
        let (obj_sender, obj_receiver) = channel::<Option<T>>(max_size);
        Pool {
            inner: Arc::new(PoolInner {
                max_size: max_size,
                manager: Box::new(manager),
                obj_sender: obj_sender,
                obj_receiver: Mutex::new(obj_receiver),
                size: AtomicUsize::new(0),
                available: AtomicIsize::new(0),
            }),
        }
    }
/// Create new connection pool with a given `manager` and `max_size`.
/// The `manager` is used to create and recycle objects and `max_size`
/// is the maximum number of objects ever created.
Create new connection pool with a given `manager` and `max_size`.
The `manager` is used to create and recycle objects and `max_size`
is the maximum number of objects ever created.
Create new connection pool with a given ` manager ` and ` max_size ` . The ` manager ` is used to create and recycle objects and ` max_size ` is the maximum number of objects ever created .
pub fn new(manager: impl Manager<T, E> + Send + Sync + 'static, max_size: usize) -> Pool<T, E> {
        let (obj_sender, obj_receiver) = channel::<Option<T>>(max_size);
        Pool {
            inner: Arc::new(PoolInner {
                max_size: max_size,
                manager: Box::new(manager),
                obj_sender: obj_sender,
                obj_receiver: Mutex::new(obj_receiver),
                size: AtomicUsize::new(0),
                available: AtomicIsize::new(0),
            }),
        }
    }
pub fn new ( manager : impl Manager < T , E > + Send + Sync + ' static , max_size : usize ) -> Pool < T , E > { let ( obj_sender , obj_receiver ) = channel :: < Option < T > > ( max_size ) ; Pool { inner : Arc :: new ( PoolInner { max_size : max_size , manager : Box :: new ( manager ) , obj_sender : obj_sender , obj_receiver : Mutex :: new ( obj_receiver ) , size : AtomicUsize :: new ( 0 ) , available : AtomicIsize :: new ( 0 ) , } ) , } }
Create new connection pool with a given `manager` and `max_size`.
Create new connection pool with a given ` manager ` and ` max_size ` .
manager
impl Manager<T, E> + Send + Sync + 'static
max_size
usize
manager
impl Manager<T, E> + Send + Sync + 'static
max_size
usize