mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-11-17 20:04:27 +00:00
- Add a new LockedReference class that models Rusts' Mutex class, making the @GuardedBy and a ReentrantLock pattern a little less verbose. Of course, we don't get any of the lifetime checking here. Gosh, I miss Rust's ownership model so much when writing concurrent code. - Rewrite Resource to work with explicit (immutable) states, and transitions between them. Each transition runs within the mutex (rather than using atomics), so it's slightly easier to reason about possible behaviours. - Update our various resources (HTTPRequest, Websocket, CheckURL) to use this new state machine system. - Merge ResourceQueue and ResourceGroup into one class.