48 AllocationPolicyMask = 0xf,
50 RequestReadOnlyPage = 16,
53 ReceiveProgressMessages = 32
61 : _tileId(tileId), _task(task)
68 return _task->getFinishedRequest(_tileId, found);
82 : _id(tileId), _task(task)
90 return _task->waitForProcessAllPages(_id);
101 return _nextTileRequestId++;
115 this->handler = handlerArg;
116 this->image =
nullptr;
121 this->image = imageArg;
122 this->handler =
nullptr;
134 ProcessAllPagesHandler* handler;
135 ManagedSubImage* image;
141 ManagedSubImage* takeRequestIfAvailable(BackgroundRequestId tileId,
bool& found);
144 ManagedSubImage* getFinishedRequest(BackgroundRequestId tileId,
bool& found);
147 bool waitForProcessAllPages(BackgroundRequestId
id);
152 void addFinishedRequest(BackgroundRequestId tileId, ManagedSubImage* image);
157 void addFinishedRequest(BackgroundRequestId tileId, ProcessAllPagesHandler* handler);
160 std::deque<RequestResult> _availableTiles;
An asynchronous process all pages request. This is copyable!
bool waitUntilFinished()
Waits until the process all pages request has finished, and returns false if the request failed.
ProcessAllPagesRequest(BackgroundRequestId tileId, ImagingBackgroundTask *task)
Base class for handlers that are used for the Module::processAllPages facility.