Cargo Features

[dependencies]
async-local = { version = "2.0.1", default-features = false, features = ["tokio-runtime", "barrier-protected-runtime"] }
default = tokio-runtime

The tokio-runtime feature is set by default whenever async-local is added without default-features = false somewhere in the dependency tree.

tokio-runtime default barrier-protected-runtime? = tokio

Enable with_blocking to spawn blocking tasks onto the Tokio Runtime

Affects async-local::runtime, async-local::AsyncLocal.with_blocking

barrier-protected-runtime = tokio-runtime

Tokio Runtime configured with a barrier-synchronized shutdown as to ensure tasks never outlive worker thread owned local data

Enables tokio

Affects async-local::Context

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

tokio barrier-protected-runtime? tokio-runtime