diff options
| author | Solstice <solstice@local> | 2026-06-09 00:17:02 -0700 |
|---|---|---|
| committer | Solstice <solstice@local> | 2026-06-09 00:17:02 -0700 |
| commit | 25e1dcf205cd14feafdd9b4cf6b7a66f253ba6d2 (patch) | |
| tree | dbb093278df115040a67791367711f06e57d3d3a /src-tauri/src/timer.rs | |
| parent | 72626524c4a1c7d6642bc170520913273acb1a5c (diff) | |
fix: backend code review — atomic writes, lock ordering, validation
Diffstat (limited to 'src-tauri/src/timer.rs')
| -rw-r--r-- | src-tauri/src/timer.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src-tauri/src/timer.rs b/src-tauri/src/timer.rs index 7e26ad8..44e5999 100644 --- a/src-tauri/src/timer.rs +++ b/src-tauri/src/timer.rs @@ -7,6 +7,10 @@ use tauri::{AppHandle, Emitter}; use crate::state::{TimerPhase, TimerState}; use crate::storage::{self, AppData}; +// LOCK ORDERING: When acquiring multiple locks, always take timer_state +// before app_data to prevent deadlock. Never acquire app_data first +// while timer_state is not held. + // ── Event payloads ────────────────────────────────────────────────────────── #[derive(Clone, Serialize)] |
