I understand that static variables are disallowed, and I understand the reasoning. Being new to this type of massively parallel programming, what is the best practice for tracking this type of global information? For example, I want to use BigDB to coordinate my various chat server rooms so they all appear to be in the same space. I would want to flush the database when the last room is closed. My first instinct was to have a static object counter that incremented and decremented with each DLL instance. When "GameClosed()" was called on the last room, it would flush the DB then shut down. Perhaps this is not the right approach in this environment. I'm used to coding single-player and asynchronous types of games. This is my first foray into synchronous multi-player systems.
Then there is the issue of threading. Normally I would use a generic "locker" object, since locking on "this" or "typeof" is not generally wise:
static readonly object locker = new object();
What is the preferred way to manage thread locking in the PlayerIO framework?
Thanks!
Aaron