summaryrefslogtreecommitdiff
path: root/src/util/channel.h
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2018-08-10 16:45:27 -0700
committerGitHub <noreply@github.com>2018-08-10 16:45:27 -0700
commit8a8d65e2fddf88bfbd6cc67d8738510feaea05e6 (patch)
tree946a8b2cc283f0da893640c2928cc86343a8b6be /src/util/channel.h
parentc9ad9015ac941f5fe5c99d7234fe74cbd40da030 (diff)
Fix portfolio command executor for changes from #2240. (#2294)
Diffstat (limited to 'src/util/channel.h')
-rw-r--r--src/util/channel.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/util/channel.h b/src/util/channel.h
index 5a5610410..8587800c1 100644
--- a/src/util/channel.h
+++ b/src/util/channel.h
@@ -74,8 +74,10 @@ public:
explicit SynchronizedSharedChannel(size_type capacity) : m_unread(0), m_container(capacity) {}
- bool push(param_type item){
- // param_type represents the "best" way to pass a parameter of type value_type to a method
+ bool push(param_type item) override
+ {
+ // param_type represents the "best" way to pass a parameter of type
+ // value_type to a method
boost::mutex::scoped_lock lock(m_mutex);
m_not_full.wait(lock, boost::bind(&SynchronizedSharedChannel<value_type>::is_not_full, this));
@@ -86,7 +88,8 @@ public:
return true;
}//function definitions need to be moved to cpp
- value_type pop(){
+ value_type pop() override
+ {
value_type ret;
boost::mutex::scoped_lock lock(m_mutex);
m_not_empty.wait(lock, boost::bind(&SynchronizedSharedChannel<value_type>::is_not_empty, this));
@@ -96,11 +99,10 @@ public:
return ret;
}
+ bool empty() override { return not is_not_empty(); }
+ bool full() override { return not is_not_full(); }
- bool empty() { return not is_not_empty(); }
- bool full() { return not is_not_full(); }
-
-private:
+ private:
SynchronizedSharedChannel(const SynchronizedSharedChannel&); // Disabled copy constructor
SynchronizedSharedChannel& operator = (const SynchronizedSharedChannel&); // Disabled assign operator
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback