feat(core): Custom thread sleep
Makes it possible to manually wake up sleeping threads
This commit is contained in:
parent
d530da0d50
commit
ec92ac91ab
3 changed files with 35 additions and 9 deletions
src/modules
|
@ -104,7 +104,7 @@ bool MpdModule::has_event()
|
|||
}
|
||||
|
||||
if (!this->mpd->connected()) {
|
||||
std::this_thread::sleep_for(3s);
|
||||
this->sleep(3s);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue