Function persist::runtime::start[][src]

pub fn start<L, B>(
    config: RuntimeConfig,
    log: L,
    blob: B,
    build: BuildInfo,
    reg: &MetricsRegistry,
    async_runtime: Option<Arc<AsyncRuntime>>
) -> Result<RuntimeClient, Error> where
    L: Log + Send + 'static,
    B: Blob + Send + 'static, 
Expand description

Starts the 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.