Skip to content

Instantly share code, notes, and snippets.

@sebglazebrook
Created June 25, 2015 02:53
Show Gist options
  • Save sebglazebrook/7a111bee137a9d50a124 to your computer and use it in GitHub Desktop.
Save sebglazebrook/7a111bee137a9d50a124 to your computer and use it in GitHub Desktop.
fn main() {
let monitors = monitor_factory::create_all();
for monitor in monitors.iter() {
let current_monitor = monitor.clone();
thread::spawn(move || {
current_monitor.run();
}).join();
}
}
// src/main.rs:13:20: 13:28 error: `monitors` does not live long enough
// src/main.rs:13 for monitor in monitors.iter() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment