Commit 11337e4f authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Cleanup VolumeDataRequestProcessor

parent eef2c317
...@@ -39,6 +39,14 @@ VolumeDataRequestProcessor::VolumeDataRequestProcessor(VolumeDataAccessManagerIm ...@@ -39,6 +39,14 @@ VolumeDataRequestProcessor::VolumeDataRequestProcessor(VolumeDataAccessManagerIm
, m_threadPool(std::thread::hardware_concurrency()) , m_threadPool(std::thread::hardware_concurrency())
{} {}
VolumeDataRequestProcessor::~VolumeDataRequestProcessor()
{
for (auto &pair : m_pageAccessors)
{
m_manager.DestroyVolumeDataPageAccessor(pair.second);
}
}
static int64_t GenJobId() static int64_t GenJobId()
{ {
static std::atomic< std::int64_t > id(0); static std::atomic< std::int64_t > id(0);
......
...@@ -75,6 +75,7 @@ class VolumeDataRequestProcessor ...@@ -75,6 +75,7 @@ class VolumeDataRequestProcessor
{ {
public: public:
VolumeDataRequestProcessor(VolumeDataAccessManagerImpl &manager); VolumeDataRequestProcessor(VolumeDataAccessManagerImpl &manager);
~VolumeDataRequestProcessor();
int64_t AddJob(const std::vector<VolumeDataChunk> &chunks, std::function<bool(VolumeDataPageImpl *page, const VolumeDataChunk &volumeDataChunk, Error &error)> processor); int64_t AddJob(const std::vector<VolumeDataChunk> &chunks, std::function<bool(VolumeDataPageImpl *page, const VolumeDataChunk &volumeDataChunk, Error &error)> processor);
bool IsCompleted(int64_t requestID); bool IsCompleted(int64_t requestID);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment