Remove rtinstrument (fixes #4600).

The code has been disabled during the last rust upgrade, and has not found an
owner. Since the next rust upgrade will bitrot it even more, it is better to
remove it for now. If anyone wishes to restore it, the code remains in version
history.
This commit is contained in:
Ms2ger 2015-01-22 13:58:46 +01:00
parent 024571dfa3
commit ee4c56bd8b
4 changed files with 6 additions and 218 deletions

View file

@ -6,13 +6,11 @@ use std::borrow::ToOwned;
use std::task;
use std::comm::Sender;
use std::task::TaskBuilder;
// use rtinstrument;
use task_state;
pub fn spawn_named(name: String, f: proc():Send) {
let builder = task::TaskBuilder::new().named(name);
builder.spawn(proc() {
// rtinstrument::instrument(f);
f();
});
}
@ -25,22 +23,18 @@ pub fn spawn_named_with_send_on_failure<T: Send>(name: &'static str,
dest: Sender<T>) {
let future_result = TaskBuilder::new().named(name).try_future(proc() {
task_state::initialize(state);
// FIXME: Find replacement for this post-runtime removal
// rtinstrument::instrument(f);
f();
});
let watched_name = name.to_owned();
let watcher_name = format!("{}Watcher", watched_name);
TaskBuilder::new().named(watcher_name).spawn(proc() {
//rtinstrument::instrument(proc() {
match future_result.into_inner() {
Ok(()) => (),
Err(..) => {
debug!("{} failed, notifying constellation", name);
dest.send(msg);
}
match future_result.into_inner() {
Ok(()) => (),
Err(..) => {
debug!("{} failed, notifying constellation", name);
dest.send(msg);
}
//});
}
});
}