Skip to main content

initialize_networking

Function initialize_networking 

Source
pub fn initialize_networking(
    process_allocators: Vec<ProcessBuilder>,
    addresses: Vec<String>,
    my_index: usize,
    threads: usize,
    noisy: bool,
    refill: BytesRefill,
    log_sender: Arc<dyn Fn(CommunicationSetup) -> Option<Logger<CapacityContainerBuilder<Vec<(Duration, CommunicationEvent)>>>> + Send + Sync>,
) -> Result<(Vec<TcpBuilder>, CommsGuard), Error>
Expand description

Initializes network connections.

process_allocators is a vector of pre-built intra-process allocator builders, one per local worker thread, that will be wrapped by the TCP layer for cross-process communication. Callers (typically Config::try_build) construct this vector by calling Process::new_vector(...).into_iter().map(ProcessBuilder::Process).collect() (or the ProcessBinary variant for the zero-copy flavor).