mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-04 11:49:58 +00:00
32 lines
665 B
C++
32 lines
665 B
C++
#include "WorkerThread.h"
|
|
|
|
namespace concurrency {
|
|
|
|
void WorkerThread::doRun()
|
|
{
|
|
startWatchdog();
|
|
|
|
while (!wantExit) {
|
|
stopWatchdog();
|
|
block();
|
|
startWatchdog();
|
|
|
|
// no need - startWatchdog is guaranteed to give us one full watchdog interval
|
|
// serviceWatchdog(); // Let our loop worker have one full watchdog interval (at least) to run
|
|
|
|
#ifdef DEBUG_STACK
|
|
static uint32_t lastPrint = 0;
|
|
if (millis() - lastPrint > 10 * 1000L) {
|
|
lastPrint = millis();
|
|
meshtastic::printThreadInfo("net");
|
|
}
|
|
#endif
|
|
|
|
loop();
|
|
}
|
|
|
|
stopWatchdog();
|
|
}
|
|
|
|
} // namespace concurrency
|