Struct backdrop::TokioTaskStrategy
source · pub struct TokioTaskStrategy();Available on crate feature
tokio only.Expand description
Strategy which spawns a new tokio task which drops the contained value.
This only works within the context of a Tokio runtime. (Dropping objects constructed with this strategy while no Tokio runtime is available will result in a panic!)
Since the overhead of creating new Tokio tasks is very small, this is really fast (at least from the perspective of the current task.)
Note that if dropping your value takes a very long time, you might be better off
using TokioBlockingTaskStrategy instead. Benchmark!