slackbuilds_ponce/academic/flexbar/seqan_flexbar_pull_20.patch
brobr f9f97d0290
academic/flexbar: incl. patches for newer tbb
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2023-11-08 00:02:01 +07:00

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;
}