async fn start_abortable_tcp_server(
    listen_addr: SocketAddr,
    tpu_addr: SocketAddr,
    bank_forks: Arc<RwLock<BankForks>>,
    block_commitment_cache: Arc<RwLock<BlockCommitmentCache>>,
    exit: Arc<AtomicBool>,
) {
    let server = start_tcp_server(
        listen_addr,
        tpu_addr,
        bank_forks.clone(),
        block_commitment_cache.clone(),
    )
    .fuse();
    let interval = IntervalStream::new(time::interval(Duration::from_millis(100))).fuse();
    pin_mut!(server, interval);
    loop {
        select! {
            _ = server => {},
            _ = interval.select_next_some() => {
                if exit.load(Ordering::Relaxed) {
                    break;
                }
            }
        }
    }
}
/// Run the TCP service until `exit` is set to true
Run the TCP service until `exit` is set to true
Run the TCP service until ` exit ` is set to true
async fn start_abortable_tcp_server(
    listen_addr: SocketAddr,
    tpu_addr: SocketAddr,
    bank_forks: Arc<RwLock<BankForks>>,
    block_commitment_cache: Arc<RwLock<BlockCommitmentCache>>,
    exit: Arc<AtomicBool>,
) {
    let server = start_tcp_server(
        listen_addr,
        tpu_addr,
        bank_forks.clone(),
        block_commitment_cache.clone(),
    )
    .fuse();
    let interval = IntervalStream::new(time::interval(Duration::from_millis(100))).fuse();
    pin_mut!(server, interval);
    loop {
        select! {
            _ = server => {},
            _ = interval.select_next_some() => {
                if exit.load(Ordering::Relaxed) {
                    break;
                }
            }
        }
    }
}
async fn start_abortable_tcp_server ( listen_addr : SocketAddr , tpu_addr : SocketAddr , bank_forks : Arc < RwLock < BankForks > > , block_commitment_cache : Arc < RwLock < BlockCommitmentCache > > , exit : Arc < AtomicBool > , ) { let server = start_tcp_server ( listen_addr , tpu_addr , bank_forks . clone ( ) , block_commitment_cache . clone ( ) , ) . fuse ( ) ; let interval = IntervalStream :: new ( time :: interval ( Duration :: from_millis ( 100 ) ) ) . fuse ( ) ; pin_mut ! ( server interval ) ; loop { select ! { server { } interval select_next_some ( ) { if exit load ( Ordering Relaxed ) { break } } } } }
Run the TCP service until `exit` is set to true
Run the TCP service until ` exit ` is set to true
listen_addr
SocketAddr
tpu_addr
SocketAddr
bank_forks
Arc<RwLock<BankForks>>
block_commitment_cache
Arc<RwLock<BlockCommitmentCache>>
exit
Arc<AtomicBool>