it seems now there is no deadlocks

This commit is contained in:
2026-10-12 16:02:30 +03:00
parent 42f43cc1a1
commit 2916bd4541

View File

@@ -292,7 +292,8 @@ public:
_updatingStopSource.get_token(), hardware, pcm);
_updateFunc = [hw = hardware, pcm_ptr = pcm, this](telemetry_data_t* tdata) {
_updateFunc = [hw=hardware, pcm_ptr=pcm, this](telemetry_data_t* tdata) mutable -> error_t {
_tdataPtr = tdata;
if (_tdataPtr != nullptr && hw && pcm_ptr) {
_lastUpdateError = MccTelemetryErrorCode::ERROR_OK;
@@ -365,6 +366,8 @@ public:
} else {
_lastUpdateError = MccTelemetryErrorCode::ERROR_NULLPTR;
}
return _lastUpdateError;
};
}
@@ -432,8 +435,8 @@ public:
// 12.10.2026: try to catch dead-lock
// use here mutex-free non-timedout implementation
_updateFunc(tdata);
return _lastUpdateError;
return _updateFunc(tdata);
// tdata = _tdataPtr;
_tdataPtr = tdata;