input/thread: use class HugeArray instead of the low-level function HugeAllocate()

This commit is contained in:
Max Kellermann
2017-09-21 21:52:44 +02:00
parent bc93c7a1fc
commit 18c4ef09d5
2 changed files with 14 additions and 26 deletions

View File

@@ -24,13 +24,13 @@
#include "InputStream.hxx"
#include "thread/Thread.hxx"
#include "thread/Cond.hxx"
#include "util/HugeAllocator.hxx"
#include "util/CircularBuffer.hxx"
#include <exception>
#include <stdint.h>
template<typename T> class CircularBuffer;
/**
* Helper class for moving InputStream implementations with blocking
* backend library implementation to a dedicated thread. Data is
@@ -54,8 +54,9 @@ class ThreadInputStream : public InputStream {
std::exception_ptr postponed_exception;
const size_t buffer_size;
CircularBuffer<uint8_t> *buffer = nullptr;
HugeArray<uint8_t> allocation;
CircularBuffer<uint8_t> buffer;
/**
* Shall the stream be closed?