feat(core): Custom thread sleep

Makes it possible to manually wake up sleeping threads
This commit is contained in:
Michael Carlberg 2016-06-20 22:11:58 +02:00
parent d530da0d50
commit ec92ac91ab
3 changed files with 35 additions and 9 deletions
src/modules

View file

@ -104,7 +104,7 @@ bool MpdModule::has_event()
}
if (!this->mpd->connected()) {
std::this_thread::sleep_for(3s);
this->sleep(3s);
return false;
}
}