mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
f9f97d0290
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
44 lines
1.1 KiB
Diff
44 lines
1.1 KiB
Diff
From 707f9381be5d42c6acd122a3c268deb66600cf9a Mon Sep 17 00:00:00 2001
|
|
From: svnbgnk <swb@live.de>
|
|
Date: Thu, 25 Jul 2019 16:35:47 +0200
|
|
Subject: [PATCH] added mutex lock to log output
|
|
|
|
---
|
|
src/Flexbar.h | 1 +
|
|
src/SeqAlign.h | 3 +++
|
|
2 files changed, 4 insertions(+)
|
|
|
|
diff --git a/src/Flexbar.h b/src/Flexbar.h
|
|
index 2f82f18..67c07d7 100644
|
|
--- a/src/Flexbar.h
|
|
+++ b/src/Flexbar.h
|
|
@@ -15,6 +15,7 @@
|
|
#include <tbb/pipeline.h>
|
|
#include <tbb/task_scheduler_init.h>
|
|
#include <tbb/concurrent_vector.h>
|
|
+#include <tbb/mutex.h>
|
|
|
|
#include <seqan/basic.h>
|
|
#include <seqan/sequence.h>
|
|
diff --git a/src/SeqAlign.h b/src/SeqAlign.h
|
|
index 979d05f..221a901 100644
|
|
--- a/src/SeqAlign.h
|
|
+++ b/src/SeqAlign.h
|
|
@@ -3,6 +3,7 @@
|
|
#ifndef FLEXBAR_SEQALIGN_H
|
|
#define FLEXBAR_SEQALIGN_H
|
|
|
|
+tbb::mutex ouputMutex;
|
|
|
|
template <typename TSeqStr, typename TString, class TAlgorithm>
|
|
class SeqAlign {
|
|
@@ -305,7 +306,9 @@ class SeqAlign {
|
|
<< "read seq " << seqRead.seq << "\n\n" << endl;
|
|
}
|
|
|
|
+ ouputMutex.lock();
|
|
*m_out << s.str();
|
|
+ ouputMutex.unlock();
|
|
|
|
return ++qIndex;
|
|
}
|