fix: use RAII render lock everywhere (#916)
## Summary Follow-up to https://github.com/crosspoint-reader/crosspoint-reader/pull/774 --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? **NO** <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Refactor** * Modernized internal synchronization mechanisms across multiple components to improve code reliability and maintainability. All functionality remains unchanged. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -118,9 +118,10 @@ void ClearCacheActivity::loop() {
|
||||
if (state == WARNING) {
|
||||
if (mappedInput.wasPressed(MappedInputManager::Button::Confirm)) {
|
||||
LOG_DBG("CLEAR_CACHE", "User confirmed, starting cache clear");
|
||||
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
||||
state = CLEARING;
|
||||
xSemaphoreGive(renderingMutex);
|
||||
{
|
||||
RenderLock lock(*this);
|
||||
state = CLEARING;
|
||||
}
|
||||
requestUpdateAndWait();
|
||||
|
||||
clearCache();
|
||||
|
||||
Reference in New Issue
Block a user