mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 00:33:45 +08:00
This commit improves the timer management system with the following enhancements: Replace Mutex with RwLock for better read concurrency in timer state Add structured TimerTask type to store task metadata Use atomic boolean for initialization flag instead of mutex Implement comprehensive error handling with detailed logging Add rollback capability when task operations fail Reduce lock contention by generating task diffs outside locks Add timing metrics for task execution Improve code organization and documentation