Optimized output waiting time algorithm

This commit is contained in:
Thulinma 2016-10-05 16:12:57 +02:00
parent b98c379182
commit 8a0799a0b8

View file

@ -585,11 +585,12 @@ namespace Mist {
}else{
VERYHIGH_MSG("Track %d no data (key %u @ %u) - waiting...", tid, getKeyForTime(tid, pos) + (getNextKey?1:0), tmp.offset);
unsigned int i = 0;
while (nProxy.curPage[tid].mapped[tmp.offset] == 0 && ++i < 42){
Util::wait(100);
while (nProxy.curPage[tid].mapped[tmp.offset] == 0 && ++i <= 10){
Util::wait(100*i);
stats();
}
if (nProxy.curPage[tid].mapped[tmp.offset] == 0){
FAIL_MSG("Track %d no data (key %u) - timeout", tid, getKeyForTime(tid, pos) + (getNextKey?1:0));
FAIL_MSG("Track %d no data (key %u@%llu) - timeout", tid, getKeyForTime(tid, pos) + (getNextKey?1:0), tmp.offset);
}else{
return seek(tid, pos, getNextKey);
}