1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-07-28 02:24:13 +00:00

Corrects some minor outstanding data races.

This commit is contained in:
Thomas Harte
2018-02-18 16:37:07 -05:00
parent c8a4432c63
commit a005dabbe3
4 changed files with 8 additions and 7 deletions

View File

@@ -62,7 +62,6 @@ Configurable::Device *MultiMachine::configurable_device() {
void MultiMachine::multi_crt_did_run_machines() {
std::lock_guard<std::mutex> machines_lock(machines_mutex_);
DynamicMachine *front = machines_.front().get();
for(const auto &machine: machines_) {
CRTMachine::Machine *crt = machine->crt_machine();
printf("%0.2f ", crt->get_confidence());
@@ -71,6 +70,7 @@ void MultiMachine::multi_crt_did_run_machines() {
}
printf("\n");
DynamicMachine *front = machines_.front().get();
std::stable_sort(machines_.begin(), machines_.end(), [] (const auto &lhs, const auto &rhs){
CRTMachine::Machine *lhs_crt = lhs->crt_machine();
CRTMachine::Machine *rhs_crt = rhs->crt_machine();