mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Make Watchdog use single thread dispatch (#1347)
Notifier has one thread per instance because the callbacks must be asynchronous. Watchdog callbacks can be synchronous, so this overhead can be done away with via a scheduler thread akin to what the HAL Notifier does.
This commit is contained in:
committed by
Peter Johnson
parent
99033481e0
commit
3b33abfc7b
@@ -23,7 +23,7 @@ using namespace frc;
|
||||
|
||||
IterativeRobotBase::IterativeRobotBase(double period)
|
||||
: m_period(period),
|
||||
m_watchdog(period, [&] { PrintLoopOverrunMessage(); }) {}
|
||||
m_watchdog(period, [this] { PrintLoopOverrunMessage(); }) {}
|
||||
|
||||
void IterativeRobotBase::RobotInit() {
|
||||
wpi::outs() << "Default " << __FUNCTION__ << "() method... Overload me!\n";
|
||||
|
||||
Reference in New Issue
Block a user