Remove ExtraBackendMethods::spawn_thread
.
It's no longer used, and `spawn_named_thread` is preferable, because naming threads is helpful when profiling.
This commit is contained in:
parent
e78fb95dfa
commit
4a120f33f7
2 changed files with 0 additions and 21 deletions
|
@ -141,18 +141,6 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
|
||||||
back::write::target_machine_factory(sess, optlvl, target_features)
|
back::write::target_machine_factory(sess, optlvl, target_features)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn spawn_thread<F, T>(time_trace: bool, f: F) -> std::thread::JoinHandle<T>
|
|
||||||
where
|
|
||||||
F: FnOnce() -> T,
|
|
||||||
F: Send + 'static,
|
|
||||||
T: Send + 'static,
|
|
||||||
{
|
|
||||||
std::thread::spawn(move || {
|
|
||||||
let _profiler = TimeTraceProfiler::new(time_trace);
|
|
||||||
f()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
fn spawn_named_thread<F, T>(
|
fn spawn_named_thread<F, T>(
|
||||||
time_trace: bool,
|
time_trace: bool,
|
||||||
name: String,
|
name: String,
|
||||||
|
|
|
@ -142,15 +142,6 @@ pub trait ExtraBackendMethods:
|
||||||
target_features: &[String],
|
target_features: &[String],
|
||||||
) -> TargetMachineFactoryFn<Self>;
|
) -> TargetMachineFactoryFn<Self>;
|
||||||
|
|
||||||
fn spawn_thread<F, T>(_time_trace: bool, f: F) -> std::thread::JoinHandle<T>
|
|
||||||
where
|
|
||||||
F: FnOnce() -> T,
|
|
||||||
F: Send + 'static,
|
|
||||||
T: Send + 'static,
|
|
||||||
{
|
|
||||||
std::thread::spawn(f)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn spawn_named_thread<F, T>(
|
fn spawn_named_thread<F, T>(
|
||||||
_time_trace: bool,
|
_time_trace: bool,
|
||||||
name: String,
|
name: String,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue