Function persist::runtime::start_read[][src]

pub fn start_read<L, B>(
    blob: B,
    build: BuildInfo,
    reg: &MetricsRegistry,
    async_runtime: Option<Arc<AsyncRuntime>>
) -> Result<RuntimeReadClient, Error> where
    B: BlobRead + Send + 'static, 
Expand description

Starts a read-only runtime in a std::thread.

This returns a clone-able client handle. The runtime is stopped when any client calls RuntimeClient::stop or when all clients have been dropped.

If Some, the given tokio::runtime::Runtime is used for IO and cpu heavy operations. If None, a new Runtime is constructed for this. The latter requires that we are not in the context of an existing Runtime, so if this is the case, the caller must use the Some form.