 |
ewmscp
..
|
Go to the documentation of this file.
33 std::unique_lock<decltype(filesInWorkMutex)> lock(filesInWorkMutex);
36 while (! filesInWork.empty()) {
45 return this->back()->getSlotType();
52 iter->second.remove_if([&request](std::unique_ptr<copyRequest::base>& item) {
55 iter->second.emplace_back(std::move(request));
59 getFileInWork().queuedRequestType = request->
getSlotType();
64 lockuser(request.getFilesInWorkIteraror()) {
70 if (iter->second.empty()) {
75 auto request = std::move(iter->second.front());
76 iter->second.pop_front();
77 iter->second.queuedRequestType = request->getSlotType();
82 lockuser(request.getFilesInWorkIteraror()) {
static std::map< std::string, fileInWork > filesInWork
maps file names to filesInWork objects
decltype(filesInWork) ::iterator iter
typeChanger(copyRequest::base &request, stateBitType newType)
this class handles the mutex protection of the filesInWork map
fileInWork::slotTypes getSlotType() const
void enRegister(std::unique_ptr< copyRequest::base > &request)
register a request in the fileInWork list
std::ostream & operator<<(std::ostream &stream, const copyRequest::clock_type::time_point &t)
void markForQueueing(std::unique_ptr< copyRequest::base > &request)
static std::condition_variable cv
needed for signaling that no file is in work anymore
std::unique_ptr< copyRequest::base > getNext()
#define defineStaticNoArg(var)
defines a static variable that needs no arguments to it's constructor
void registerIterator(decltype(filesInWorkIterator) iter)
static void waitForAllInstancesGone()
slotTypes queuedRequestType
#define timerInst(subfunc)
slotTypes getLatestRequestType() const
eraser(const copyRequest::base &request)
static std::mutex filesInWorkMutex
protects the filesInWork map
void clear(const T aBits)