You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a shared state for each session behind a lock, which book-keeps changes
Expose the shared state via the Session handle
Upon updating the state, notify the Session via an Update message
Further thoughts:
Deadlocks and other problems should be avoided per-design. As in not exposing the lock directly and just having functions to access and update the state. For example instead of getting a mutable reference to the current stats we should allow add/sub stats:
Activity