From 844e3d94f72fe53fa8a7e758dc2f71bb570198e2 Mon Sep 17 00:00:00 2001 From: Fengchao Date: Tue, 30 Jan 2018 16:57:16 +0800 Subject: [PATCH] Always single thread in debug mode. --- src/main/java/proteomics/ECL2.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/proteomics/ECL2.java b/src/main/java/proteomics/ECL2.java index cf527bb..4dbf9ae 100644 --- a/src/main/java/proteomics/ECL2.java +++ b/src/main/java/proteomics/ECL2.java @@ -137,6 +137,9 @@ private ECL2(String parameter_path, String spectra_path) throws IOException, MzX if (thread_num == 0) { thread_num = 1 + Runtime.getRuntime().availableProcessors(); } + if (debug) { + thread_num = 1; + } ExecutorService thread_pool = Executors.newFixedThreadPool(thread_num); Search search_obj = new Search(build_index_obj, parameter_map); List> taskList = new LinkedList<>();