Skip to main content

init_with_pool

Function init_with_pool 

Source
pub fn init_with_pool(
    config: &Config,
    fjall: Database,
    pool: Arc<ThreadPool>,
) -> Result<(BlockchainReadHandle, BlockchainWriteHandle, Arc<BlockchainDatabase>), BlockchainError>
Expand description

Initialize a database, and return a read/write handle to it.

Once the returned handles are Drop::droped, the reader thread-pool and writer thread will exit automatically.

ยงErrors

This will error if we fail to open the database.