it seems now there is no deadlocks
This commit is contained in:
@@ -292,7 +292,8 @@ public:
|
|||||||
_updatingStopSource.get_token(), hardware, pcm);
|
_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) {
|
if (_tdataPtr != nullptr && hw && pcm_ptr) {
|
||||||
_lastUpdateError = MccTelemetryErrorCode::ERROR_OK;
|
_lastUpdateError = MccTelemetryErrorCode::ERROR_OK;
|
||||||
|
|
||||||
@@ -365,6 +366,8 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
_lastUpdateError = MccTelemetryErrorCode::ERROR_NULLPTR;
|
_lastUpdateError = MccTelemetryErrorCode::ERROR_NULLPTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return _lastUpdateError;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -432,8 +435,8 @@ public:
|
|||||||
|
|
||||||
// 12.10.2026: try to catch dead-lock
|
// 12.10.2026: try to catch dead-lock
|
||||||
// use here mutex-free non-timedout implementation
|
// use here mutex-free non-timedout implementation
|
||||||
_updateFunc(tdata);
|
return _updateFunc(tdata);
|
||||||
return _lastUpdateError;
|
// tdata = _tdataPtr;
|
||||||
|
|
||||||
_tdataPtr = tdata;
|
_tdataPtr = tdata;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user