tokio-scoped
tokio-scoped provides a scope
function and ScopedRuntime
struct inspired by crossbeam
but for the tokio
Runtime. A scope allows one to spawn futures which do not have a 'static
lifetime
by ensuring each future spawned in the scope completes before the scope exits.
Example
# extern crate tokio_scoped;
# extern crate futures;
# use lazy;
let mut v = String from;
scope;
// The scope won't exit until all spawned futures are complete.
assert_eq!;