Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 18410788 authored by BOULLE Olivier's avatar BOULLE Olivier
Browse files

revert mutex test

parent 7bb150f3
Branches
No related tags found
No related merge requests found
......@@ -127,8 +127,7 @@ void process_file_part(const std::string& input_filename, int part_id, int start
}
// lock the mutex for this output file until the end of this loop iteration
//std::lock_guard<std::mutex> lock(output_mutexes[cluster_id]);
output_mutexes[cluster_id].lock();
std::lock_guard<std::mutex> lock(output_mutexes[cluster_id]);
// write the sequence and its id to a cluster file corresponding to the bases found after the primer
std::ofstream output_file(output_dir + "/" + cluster_id + ".fasta", std::ios::app); // ios app is to append to the file
if (!output_file.is_open()) {
......@@ -138,7 +137,6 @@ void process_file_part(const std::string& input_filename, int part_id, int start
}
output_file << ">" << read_name << "\n" << sequence << "\n"; // output format is fasta
output_file.close();
output_mutexes[cluster_id].unlock();
}
input_read_file.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment