Files
tokio/tokio-channel/tests/support/mod.rs
T

17 lines
284 B
Rust
Raw Normal View History

use futures::Future;
pub trait ForgetExt {
fn forget(self);
}
impl<F> ForgetExt for F
where F: Future + Sized + Send + 'static,
F::Item: Send,
F::Error: Send
{
fn forget(self) {
use std::thread;
thread::spawn(|| self.wait());
}
}