pub(crate) fn start_background_thread(pool: Weak<ConnectionPoolInner>) {
    std::thread::spawn(move || loop {
        match pool.upgrade() {
            Some(pool) => perform_checks(pool.into()),
            None => return,
        };

        std::thread::sleep(Duration::from_millis(10));
    });
}
/// Initializes the background thread for a connection pool. A weak reference is used to ensure that
/// the connection pool is not kept alive by the background thread; the background thread will
/// terminate if the weak reference cannot be converted to a strong reference.
Initializes the background thread for a connection pool. A weak reference is used to ensure that
the connection pool is not kept alive by the background thread; the background thread will
terminate if the weak reference cannot be converted to a strong reference.
Initializes the background thread for a connection pool . A weak reference is used to ensure that the connection pool is not kept alive by the background thread ; the background thread will terminate if the weak reference cannot be converted to a strong reference .
pub(crate) fn start_background_thread(pool: Weak<ConnectionPoolInner>) {
    std::thread::spawn(move || loop {
        match pool.upgrade() {
            Some(pool) => perform_checks(pool.into()),
            None => return,
        };
        std::thread::sleep(Duration::from_millis(10));
    });
}
pub ( crate ) fn start_background_thread ( pool : Weak < ConnectionPoolInner > ) { std :: thread :: spawn ( move | | loop { match pool . upgrade ( ) { Some ( pool ) => perform_checks ( pool . into ( ) ) , None => return , } ; std :: thread :: sleep ( Duration :: from_millis ( 10 ) ) ; } ) ; }
Initializes the background thread for a connection pool.
Initializes the background thread for a connection pool .
pool
Weak<ConnectionPoolInner>
pool
Weak<ConnectionPoolInner>