use crate::actors::prelude::*;
use crate::examples::actors::supervision::a_actor;
use crate::examples::actors::supervision::c_actor;
use crate::futures::future::WrappedFuture;
use std::sync::{Mutex, Arc};
use std::thread;
use std::time::Duration;
pub fn run() {
let mut system = LocalActorSystem::new();
let mut a = system
.actor_of(a_actor::props(), Some("a"));
thread::sleep(Duration::from_secs(1));
let mut selection = system.actor_select("/root/a/b/c");
let c = &mut selection[0];
println!("Selected actor with path '{}'", c.path());
c.tell(msg!(c_actor::HelloToC {}), None);
thread::sleep(Duration::from_secs(1));
c.tell(msg!(c_actor::FailMe {}), None);
thread::park()
}