29 if (fList.size()==0)
return;
31 cmd << fList.front().cmd;
32 kind = fList.front().kind;
58 QueueRecsList::iterator iter = fList.begin();
59 while (iter != fList.end()) {
61 if (!iter->cmd.IsTimedout()) { iter++;
continue; }
65 QueueRecsList::iterator curr = iter++;
73 if (kind == kindNone) kind = fKind;
76 do { fIdCounter++; }
while (fIdCounter==0);
80 fList.back().cmd << cmd;
81 fList.back().kind = kind;
82 fList.back().id = fIdCounter;
93 cmd << fList.front().cmd;
102 for (QueueRecsList::iterator iter = fList.begin(); iter != fList.end(); iter++) {
103 if (iter->kind==kind) {
116 for (QueueRecsList::iterator iter = fList.begin(); iter != fList.end(); iter++) {
135 return fList.size()>0 ? fList.front().kind : kindNone;
140 for (QueueRecsList::iterator iter = fList.begin(); iter != fList.end(); iter++) {
141 if (iter->cmd==cmd) {
147 return Push(cmd, kind);
Represents command with its arguments.
void Release()
Method used to clean command - all internal data will be cleaned, command container will be released.
void Reply(int res=cmd_noresult)
Replied on the command.
void RemoveCaller(Worker *worker, bool *exe_ready=nullptr)
uint32_t ChangeKind(Command &cmd, EKind kind)
Change kind of the entry for specified command.
void Cleanup(Mutex *m=nullptr, Worker *proc=nullptr, int res=cmd_false)
void ReplyTimedout()
Reply timed-out commands.
Command PopWithId(uint32_t id)
CommandsQueue(EKind kind=kindNone)
Normal constructor.
Command PopWithKind(EKind kind)
void ReplyAll(int res)
Reply all commands.
uint32_t Push(Command cmd, EKind kind=kindNone)
Add reference on the command in the queue.
Lock guard for posix mutex.
Active object, which is working inside dabc::Thread.