diff options
author | Josh Blum | 2012-10-01 20:12:40 -0700 |
---|---|---|
committer | Josh Blum | 2012-10-01 20:12:40 -0700 |
commit | bc1d4e117fab42150bc62d1940e142dd6d10aadc (patch) | |
tree | 343eb0fa95896b0015e9188d1cf82c8624e25be6 /lib/gras_impl/buffer_queue.hpp | |
parent | 29a2a6679ba8c149b1220d06225abaf89d8c88f0 (diff) | |
download | sandhi-bc1d4e117fab42150bc62d1940e142dd6d10aadc.tar.gz sandhi-bc1d4e117fab42150bc62d1940e142dd6d10aadc.tar.bz2 sandhi-bc1d4e117fab42150bc62d1940e142dd6d10aadc.zip |
revert buffer queue changes, unknown issue
Diffstat (limited to 'lib/gras_impl/buffer_queue.hpp')
-rw-r--r-- | lib/gras_impl/buffer_queue.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/gras_impl/buffer_queue.hpp b/lib/gras_impl/buffer_queue.hpp index e9950b8..b3c9cf7 100644 --- a/lib/gras_impl/buffer_queue.hpp +++ b/lib/gras_impl/buffer_queue.hpp @@ -19,26 +19,26 @@ #include <gnuradio/sbuffer.hpp> #include <boost/bind.hpp> -#include <boost/circular_buffer.hpp> +#include <queue> namespace gnuradio { -struct BufferQueue : boost::circular_buffer<SBuffer> +struct BufferQueue : std::queue<SBuffer> { - enum {MAX_QUEUE_SIZE = 4}; - BufferQueue(void) { - this->resize(MAX_QUEUE_SIZE); - SBufferDeleter deleter = boost::bind(&BufferQueue::push_back, this, _1); + SBufferDeleter deleter = boost::bind(&BufferQueue::push, this, _1); _token = SBufferToken(new SBufferDeleter(deleter)); } ~BufferQueue(void) { _token.reset(); - this->clear(); + while (not this->empty()) + { + this->pop(); + } } void allocate_one(const size_t num_bytes) |