Use an interruptible sleep to allow our threads to exit sooner
This commit is contained in:
parent
9220fcb8e8
commit
d6971983aa
5 changed files with 20 additions and 7 deletions
|
|
@ -511,7 +511,7 @@ static void controlReceiveThreadFunc(void* context) {
|
|||
}
|
||||
else {
|
||||
// No events ready
|
||||
PltSleepMs(100);
|
||||
PltSleepMsInterruptible(&controlReceiveThread, 100);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -617,7 +617,7 @@ static void lossStatsThreadFunc(void* context) {
|
|||
lossCountSinceLastReport = 0;
|
||||
|
||||
// Wait a bit
|
||||
PltSleepMs(LOSS_REPORT_INTERVAL_MS);
|
||||
PltSleepMsInterruptible(&lossStatsThread, LOSS_REPORT_INTERVAL_MS);
|
||||
}
|
||||
|
||||
free(lossStatsPayload);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue