/// Creates new pool of connections.
Creates new pool of connections.
Creates new pool of connections .
pub fn new<O: Into<Opts>>(opts: O) -> Pool {
        let opts = opts.into();
        let pool_constraints = opts.get_pool_constraints().clone();
        let (tx, rx) = mpsc::unbounded_channel();
        Pool {
            opts,
            inner: Arc::new(Inner {
                close: false.into(),
                closed: false.into(),
                idle: crossbeam::queue::ArrayQueue::new(pool_constraints.max()),
                wake: crossbeam::queue::SegQueue::new(),
                exist: 0.into(),
                extra_wakeups: 0.into(),
                maker: Mutex::new(Some((rx, pool_constraints.min()))),
            }),
            drop: tx,
            pool_constraints,
        }
    }
pub fn new < O : Into < Opts > > ( opts : O ) -> Pool { let opts = opts . into ( ) ; let pool_constraints = opts . get_pool_constraints ( ) . clone ( ) ; let ( tx , rx ) = mpsc :: unbounded_channel ( ) ; Pool { opts , inner : Arc :: new ( Inner { close : false . into ( ) , closed : false . into ( ) , idle : crossbeam :: queue :: ArrayQueue :: new ( pool_constraints . max ( ) ) , wake : crossbeam :: queue :: SegQueue :: new ( ) , exist : 0 . into ( ) , extra_wakeups : 0 . into ( ) , maker : Mutex :: new ( Some ( ( rx , pool_constraints . min ( ) ) ) ) , } ) , drop : tx , pool_constraints , } }
Creates new pool of connections.
Creates new pool of connections .
opts
O