From 566a9f57ecddf8fc348ec72f17964e1cc9caa845 Mon Sep 17 00:00:00 2001 From: BenDr0id Date: Tue, 17 Jul 2018 14:09:39 +0200 Subject: [PATCH] Fixed cpu affinity for single thread --- src/workers/Worker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/workers/Worker.cpp b/src/workers/Worker.cpp index b5a84f8b..4f95cb1a 100644 --- a/src/workers/Worker.cpp +++ b/src/workers/Worker.cpp @@ -33,13 +33,14 @@ Worker::Worker(Handle *handle) : m_id(handle->threadId()), + m_affinedCpu(0), m_threads(handle->threads()), m_hashCount(0), m_timestamp(0), m_count(0), m_sequence(0) { - if (m_threads > 1 && m_threads <= Cpu::threads()) { + if (m_threads > 0 && m_threads <= Cpu::threads()) { m_affinedCpu = Cpu::setThreadAffinity(m_id, handle->affinity()); }