cuprate_blockchain::service

Function init_read_service

Source
pub fn init_read_service(
    env: Arc<ConcreteEnv>,
    threads: ReaderThreads,
) -> BlockchainReadHandle
Expand description

Initialize the BlockchainReadHandle thread-pool backed by rayon.

This spawns threads amount of reader threads attached to env and returns a handle to the pool.

Should be called once per actual database. Calling this function more than once will create multiple unnecessary rayon thread-pools.