diff options
author | Unknown <fireice2@o2.pl> | 2017-11-16 13:42:27 +0000 |
---|---|---|
committer | Unknown <fireice2@o2.pl> | 2017-11-16 13:42:27 +0000 |
commit | cabd46f39fdadad7345f9603ccdcf1daf49e1a9c (patch) | |
tree | 2b5dc47b60d3b1d001a0bf4830b7bf47d253190c /xmrstak/misc/thdq.hpp | |
parent | 157dd16574c04cb78b704bd809c8919527bd7b61 (diff) | |
download | xmr-stak-cabd46f39fdadad7345f9603ccdcf1daf49e1a9c.zip xmr-stak-cabd46f39fdadad7345f9603ccdcf1daf49e1a9c.tar.gz |
Remove whitespace lines
Diffstat (limited to 'xmrstak/misc/thdq.hpp')
-rw-r--r-- | xmrstak/misc/thdq.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xmrstak/misc/thdq.hpp b/xmrstak/misc/thdq.hpp index 248c807..7a4a5cf 100644 --- a/xmrstak/misc/thdq.hpp +++ b/xmrstak/misc/thdq.hpp @@ -1,10 +1,10 @@ #pragma once
-
+ #include <queue>
#include <thread>
#include <mutex>
#include <condition_variable>
-
+ template <typename T>
class thdq
{
@@ -17,7 +17,7 @@ public: queue_.pop();
return item;
}
-
+ void pop(T& item)
{
std::unique_lock<std::mutex> mlock(mutex_);
@@ -25,7 +25,7 @@ public: item = queue_.front();
queue_.pop();
}
-
+ void push(const T& item)
{
std::unique_lock<std::mutex> mlock(mutex_);
@@ -33,7 +33,7 @@ public: mlock.unlock();
cond_.notify_one();
}
-
+ void push(T&& item)
{
std::unique_lock<std::mutex> mlock(mutex_);
@@ -41,7 +41,7 @@ public: mlock.unlock();
cond_.notify_one();
}
-
+ private:
std::queue<T> queue_;
std::mutex mutex_;
|