Commit 9fb19b5
committed
cap catch-up tick iters in skip_and_tick to prevent queue starvation
When the timer thread is suspended for a long time skip_and_tick could loop for tons of iters.
We instead cap it so it stays more responsive.
The run() loop re-enters immediately and continues catching
up on subsequent iterations, so no timer accuracy is permanently lost.1 parent 2920d2f commit 9fb19b5
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
443 | 446 | | |
444 | 447 | | |
445 | 448 | | |
| |||
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
453 | 459 | | |
454 | 460 | | |
455 | 461 | | |
456 | 462 | | |
457 | 463 | | |
458 | 464 | | |
| 465 | + | |
459 | 466 | | |
460 | 467 | | |
461 | 468 | | |
| |||
0 commit comments