mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
[sim] Make SimDevice callbacks synchronous (#2861)
Asynchronous callbacks are more efficient but pose synchronization challenges; other sim callbacks are synchronous but SimDevice ones were not.
This commit is contained in:
@@ -170,7 +170,7 @@ void HALSimWSProviderSimDevices::Initialize(wpi::uv::Loop& loop) {
|
||||
m_deviceCreatedCbKey = HALSIM_RegisterSimDeviceCreatedCallback(
|
||||
"", this, HALSimWSProviderSimDevices::DeviceCreatedCallbackStatic, 1);
|
||||
m_deviceFreedCbKey = HALSIM_RegisterSimDeviceFreedCallback(
|
||||
"", this, HALSimWSProviderSimDevices::DeviceFreedCallbackStatic);
|
||||
"", this, HALSimWSProviderSimDevices::DeviceFreedCallbackStatic, false);
|
||||
|
||||
m_exec = UvExecFn::Create(loop, [](auto out, LoopFn func) {
|
||||
func();
|
||||
|
||||
Reference in New Issue
Block a user