Changed sleep to wait everywhere where it was needed

This commit is contained in:
Erik Zandvliet 2016-05-18 17:06:03 +02:00
parent 3ad8317df7
commit 72de5e5b90
9 changed files with 18 additions and 18 deletions

View file

@ -63,7 +63,7 @@ void Util::Procs::exit_handler() {
break;
}
if (!listcopy.empty()) {
Util::sleep(20);
Util::wait(20);
++waiting;
}
}
@ -91,7 +91,7 @@ void Util::Procs::exit_handler() {
break;
}
if (!listcopy.empty()) {
Util::sleep(20);
Util::wait(20);
++waiting;
}
}
@ -119,7 +119,7 @@ void Util::Procs::exit_handler() {
break;
}
if (!listcopy.empty()) {
Util::sleep(20);
Util::wait(20);
++waiting;
}
}

View file

@ -405,7 +405,7 @@ namespace IPC {
int i = 0;
do {
if (i != 0) {
Util::sleep(1000);
Util::wait(1000);
}
handle = OpenFileMappingA(FILE_MAP_ALL_ACCESS, FALSE, name.c_str());
i++;
@ -438,7 +438,7 @@ namespace IPC {
int i = 0;
while (i < 10 && handle == -1 && autoBackoff) {
i++;
Util::sleep(1000);
Util::wait(1000);
handle = shm_open(name.c_str(), O_RDWR, ACCESSPERMS);
}
}
@ -558,7 +558,7 @@ namespace IPC {
int i = 0;
while (i < 10 && handle == -1 && autoBackoff) {
i++;
Util::sleep(1000);
Util::wait(1000);
handle = open(std::string(Util::getTmpFolder() + name).c_str(), O_RDWR, (mode_t)0600);
}
}

View file

@ -313,7 +313,7 @@ bool Util::startInput(std::string streamname, std::string filename, bool forkFir
unsigned int waiting = 0;
while (!streamAlive(streamname) && ++waiting < 40){
Util::sleep(250);
Util::wait(250);
}
return streamAlive(streamname);