mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +00:00
update system: clear multiple posts in case of slow updates
This commit is contained in:
parent
b99c7291bc
commit
06304030a2
@ -98,6 +98,11 @@ namespace conky {
|
|||||||
sem_start.wait();
|
sem_start.wait();
|
||||||
if(done)
|
if(done)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// clear any remaining posts in case the previous iteration was very slow
|
||||||
|
// (this should only happen if wait == false)
|
||||||
|
while(sem_start.trywait());
|
||||||
|
|
||||||
work();
|
work();
|
||||||
if(wait)
|
if(wait)
|
||||||
sem_wait.post();
|
sem_wait.post();
|
||||||
|
Loading…
Reference in New Issue
Block a user